Esempio n. 1
0
File: Element.php Progetto: sop/asn1
 /**
  * Determine the class that implements the type.
  *
  * @param Identifier $identifier
  * @return string Class name
  */
 protected static function _determineImplClass(Identifier $identifier)
 {
     // tagged type
     if ($identifier->isContextSpecific()) {
         return TaggedType::class;
     }
     // universal class
     if ($identifier->isUniversal()) {
         return self::_determineUniversalImplClass(intval($identifier->tag()));
     }
     throw new \UnexpectedValueException(Identifier::classToName($identifier->typeClass()) . " " . $identifier->tag() . " not implemented.");
 }
Esempio n. 2
0
File: DERData.php Progetto: sop/asn1
 /**
  *
  * @see \ASN1\Element::typeClass()
  * @return int
  */
 public function typeClass()
 {
     return $this->_identifier->typeClass();
 }