public function asObjectIdentifier(): Primitive\ObjectIdentifier
    {
        if (!$this->_element instanceof Primitive\ObjectIdentifier) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(
                    Element::TYPE_OBJECT_IDENTIFIER));
        }
        return $this->_element;
    }
public function asObjectIdentifier(): Primitive\ObjectIdentifier
    {
        if (!$this->_element instanceof Primitive\ObjectIdentifier) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(
                    Element::TYPE_OBJECT_IDENTIFIER));
        }
        return $this->_element;
    }
public function asObjectIdentifier ( ) : Primitive \ ObjectIdentifier { if ( ! $ this -> _element instanceof Primitive \ ObjectIdentifier ) { throw new \ UnexpectedValueException ( $ this -> _generateExceptionMessage ( Element :: TYPE_OBJECT_IDENTIFIER ) ) ; } return $ this -> _element ; }
Get the wrapped element as an object identifier type.

@throws \UnexpectedValueException If the element is not an object
identifier
@return \ASN1\Type\Primitive\ObjectIdentifier
Get the wrapped element as an object identifier type .