public function getDocumentType()
    {
        if (!$this->version) {
            $version = (string) $this->VERSION;

            switch ($version) {
                case '2.1':
                    $this->version = self::VCARD21;
                    break;
                case '3.0':
                    $this->version = self::VCARD30;
                    break;
                case '4.0':
                    $this->version = self::VCARD40;
                    break;
                default:
                    // We don't want to cache the version if it's unknown,
                    // because we might get a version property in a bit.
                    return self::UNKNOWN;
            }
        }

        return $this->version;
    }
public function getDocumentType()
    {
        if (!$this->version) {
            $version = (string) $this->VERSION;

            switch ($version) {
                case '2.1':
                    $this->version = self::VCARD21;
                    break;
                case '3.0':
                    $this->version = self::VCARD30;
                    break;
                case '4.0':
                    $this->version = self::VCARD40;
                    break;
                default:
                    // We don't want to cache the version if it's unknown,
                    // because we might get a version property in a bit.
                    return self::UNKNOWN;
            }
        }

        return $this->version;
    }
public function getDocumentType ( ) { if ( ! $ this -> version ) { $ version = ( string ) $ this -> VERSION ; switch ( $ version ) { case '2.1' : $ this -> version = self :: VCARD21 ; break ; case '3.0' : $ this -> version = self :: VCARD30 ; break ; case '4.0' : $ this -> version = self :: VCARD40 ; break ; default : // We don't want to cache the version if it's unknown, // because we might get a version property in a bit. return self :: UNKNOWN ; } } return $ this -> version ; }
Returns the current document type.

@return int
Returns the current document type .