public function asGeneralizedTime(): Primitive\GeneralizedTime
    {
        if (!$this->_element instanceof Primitive\GeneralizedTime) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_GENERALIZED_TIME));
        }
        return $this->_element;
    }
public function asGeneralizedTime(): Primitive\GeneralizedTime
    {
        if (!$this->_element instanceof Primitive\GeneralizedTime) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_GENERALIZED_TIME));
        }
        return $this->_element;
    }
public function asGeneralizedTime ( ) : Primitive \ GeneralizedTime { if ( ! $ this -> _element instanceof Primitive \ GeneralizedTime ) { throw new \ UnexpectedValueException ( $ this -> _generateExceptionMessage ( Element :: TYPE_GENERALIZED_TIME ) ) ; } return $ this -> _element ; }
Get the wrapped element as a generalized time type.

@throws \UnexpectedValueException If the element is not a generalized
time
@return \ASN1\Type\Primitive\GeneralizedTime
Get the wrapped element as a generalized time type .