public static function getShortName($identifier)
    {
        $identifierOctet = self::makeNumeric($identifier);

        switch ($identifierOctet) {
            case self::EOC:
                return 'End-of-contents octet';
            case self::BOOLEAN:
                return 'Boolean';
            case self::INTEGER:
                return 'Integer';
            case self::BITSTRING:
                return 'Bit String';
            case self::OCTETSTRING:
                return 'Octet String';
            case self::NULL:
                return 'NULL';
            case self::OBJECT_IDENTIFIER:
                return 'Object Identifier';
            case self::OBJECT_DESCRIPTOR:
                return 'Object Descriptor';
            case self::EXTERNAL:
                return 'External Type';
            case self::REAL:
                return 'Real';
            case self::ENUMERATED:
                return 'Enumerated';
            case self::EMBEDDED_PDV:
                return 'Embedded PDV';
            case self::UTF8_STRING:
                return 'UTF8 String';
            case self::RELATIVE_OID:
                return 'Relative OID';
            case self::SEQUENCE:
                return 'Sequence';
            case self::SET:
                return 'Set';
            case self::NUMERIC_STRING:
                return 'Numeric String';
            case self::PRINTABLE_STRING:
                return 'Printable String';
            case self::T61_STRING:
                return 'T61 String';
            case self::VIDEOTEXT_STRING:
                return 'Videotext String';
            case self::IA5_STRING:
                return 'IA5 String';
            case self::UTC_TIME:
                return 'UTC Time';
            case self::GENERALIZED_TIME:
                return 'Generalized Time';
            case self::GRAPHIC_STRING:
                return 'Graphic String';
            case self::VISIBLE_STRING:
                return 'Visible String';
            case self::GENERAL_STRING:
                return 'General String';
            case self::UNIVERSAL_STRING:
                return 'Universal String';
            case self::CHARACTER_STRING:
                return 'Character String';
            case self::BMP_STRING:
                return 'BMP String';

            case 0x0E:
                return 'RESERVED (0x0E)';
            case 0x0F:
                return 'RESERVED (0x0F)';

            case self::LONG_FORM:
            default:
                $classDescription = self::getClassDescription($identifier);

                if (is_int($identifier)) {
                    $identifier = chr($identifier);
                }

                return "$classDescription (0x".strtoupper(bin2hex($identifier)).')';
        }
    }
public static function getShortName($identifier)
    {
        $identifierOctet = self::makeNumeric($identifier);

        switch ($identifierOctet) {
            case self::EOC:
                return 'End-of-contents octet';
            case self::BOOLEAN:
                return 'Boolean';
            case self::INTEGER:
                return 'Integer';
            case self::BITSTRING:
                return 'Bit String';
            case self::OCTETSTRING:
                return 'Octet String';
            case self::NULL:
                return 'NULL';
            case self::OBJECT_IDENTIFIER:
                return 'Object Identifier';
            case self::OBJECT_DESCRIPTOR:
                return 'Object Descriptor';
            case self::EXTERNAL:
                return 'External Type';
            case self::REAL:
                return 'Real';
            case self::ENUMERATED:
                return 'Enumerated';
            case self::EMBEDDED_PDV:
                return 'Embedded PDV';
            case self::UTF8_STRING:
                return 'UTF8 String';
            case self::RELATIVE_OID:
                return 'Relative OID';
            case self::SEQUENCE:
                return 'Sequence';
            case self::SET:
                return 'Set';
            case self::NUMERIC_STRING:
                return 'Numeric String';
            case self::PRINTABLE_STRING:
                return 'Printable String';
            case self::T61_STRING:
                return 'T61 String';
            case self::VIDEOTEXT_STRING:
                return 'Videotext String';
            case self::IA5_STRING:
                return 'IA5 String';
            case self::UTC_TIME:
                return 'UTC Time';
            case self::GENERALIZED_TIME:
                return 'Generalized Time';
            case self::GRAPHIC_STRING:
                return 'Graphic String';
            case self::VISIBLE_STRING:
                return 'Visible String';
            case self::GENERAL_STRING:
                return 'General String';
            case self::UNIVERSAL_STRING:
                return 'Universal String';
            case self::CHARACTER_STRING:
                return 'Character String';
            case self::BMP_STRING:
                return 'BMP String';

            case 0x0E:
                return 'RESERVED (0x0E)';
            case 0x0F:
                return 'RESERVED (0x0F)';

            case self::LONG_FORM:
            default:
                $classDescription = self::getClassDescription($identifier);

                if (is_int($identifier)) {
                    $identifier = chr($identifier);
                }

                return "$classDescription (0x".strtoupper(bin2hex($identifier)).')';
        }
    }
public static function getShortName ( $ identifier ) { $ identifierOctet = self :: makeNumeric ( $ identifier ) ; switch ( $ identifierOctet ) { case self :: EOC : return 'End-of-contents octet' ; case self :: BOOLEAN : return 'Boolean' ; case self :: INTEGER : return 'Integer' ; case self :: BITSTRING : return 'Bit String' ; case self :: OCTETSTRING : return 'Octet String' ; case self :: NULL : return 'NULL' ; case self :: OBJECT_IDENTIFIER : return 'Object Identifier' ; case self :: OBJECT_DESCRIPTOR : return 'Object Descriptor' ; case self :: EXTERNAL : return 'External Type' ; case self :: REAL : return 'Real' ; case self :: ENUMERATED : return 'Enumerated' ; case self :: EMBEDDED_PDV : return 'Embedded PDV' ; case self :: UTF8_STRING : return 'UTF8 String' ; case self :: RELATIVE_OID : return 'Relative OID' ; case self :: SEQUENCE : return 'Sequence' ; case self :: SET : return 'Set' ; case self :: NUMERIC_STRING : return 'Numeric String' ; case self :: PRINTABLE_STRING : return 'Printable String' ; case self :: T61_STRING : return 'T61 String' ; case self :: VIDEOTEXT_STRING : return 'Videotext String' ; case self :: IA5_STRING : return 'IA5 String' ; case self :: UTC_TIME : return 'UTC Time' ; case self :: GENERALIZED_TIME : return 'Generalized Time' ; case self :: GRAPHIC_STRING : return 'Graphic String' ; case self :: VISIBLE_STRING : return 'Visible String' ; case self :: GENERAL_STRING : return 'General String' ; case self :: UNIVERSAL_STRING : return 'Universal String' ; case self :: CHARACTER_STRING : return 'Character String' ; case self :: BMP_STRING : return 'BMP String' ; case 0x0E : return 'RESERVED (0x0E)' ; case 0x0F : return 'RESERVED (0x0F)' ; case self :: LONG_FORM : default : $ classDescription = self :: getClassDescription ( $ identifier ) ; if ( is_int ( $ identifier ) ) { $ identifier = chr ( $ identifier ) ; } return "$classDescription (0x" . strtoupper ( bin2hex ( $ identifier ) ) . ')' ; } }
Return the short version of the type name.

If the given identifier octet can be mapped to a known universal type this will
return its name. Else Identifier::getClassDescription() is used to retrieve
information about the identifier.

@see Identifier::getName()
@see Identifier::getClassDescription()

@param int|string $identifier

@return string
Return the short version of the type name .