/** * * @see \ASN1\Type\Tagged\ImplicitTagging::implicit() * @return UnspecifiedType */ public function implicit($tag, $class = Identifier::CLASS_UNIVERSAL) { $this->_element->expectType($tag); if ($this->_element->typeClass() != $class) { throw new \UnexpectedValueException("Type class " . Identifier::classToName($class) . " expected, got " . Identifier::classToName($this->_element->typeClass()) . "."); } return new UnspecifiedType($this->_element); }
/** * Get textual description of the wrapped element for debugging purposes. * * @return string */ private function _typeDescriptorString() { $type_cls = $this->_element->typeClass(); $tag = $this->_element->tag(); if ($type_cls == Identifier::CLASS_UNIVERSAL) { return Element::tagToName($tag); } return Identifier::classToName($type_cls) . " TAG {$tag}"; }
/** * Get textual description of the type for debugging purposes. * * @return string */ protected function _typeDescriptorString() { if ($this->typeClass() == Identifier::CLASS_UNIVERSAL) { return self::tagToName($this->_typeTag); } return Identifier::classToName($this->typeClass()) . " TAG " . $this->_typeTag; }