Get the wrapped element as a IA5 string type.

@throws \UnexpectedValueException If the element is not a IA5 string
@return \ASN1\Type\Primitive\IA5String
763710
public function asIA5String(): Primitive\IA5String
    {
        if (!$this->_element instanceof Primitive\IA5String) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_IA5_STRING));
        }
        return $this->_element;
    }
766695
protected function getMetaForeignKey()
    {
        foreach ($this->builtInClasses as $model => $meta) {
            if ($this instanceof $model) {
                $basename = class_basename($model);

                return sprintf('%s_id', strtolower($basename));
            }
        }

        throw new UnexpectedValueException(sprintf('%s must extends one of Corcel built-in models: Comment, Post, Term or User.', static::class));
    }
53908
public function current()
    {
        if (!isset($this->tokenList[$this->ptr])) {
            throw new \UnexpectedValueException("Unexpected input at offset {$this->ptr}, unexpected end of stream");
        }
        return $this->tokenList[$this->ptr];
    }
14471
public function asUTF8String(): Primitive\UTF8String
    {
        if (!$this->_element instanceof Primitive\UTF8String) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_UTF8_STRING));
        }
        return $this->_element;
    }
337043
public function asEnumerated(): Primitive\Enumerated
    {
        if (!$this->_element instanceof Primitive\Enumerated) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_ENUMERATED));
        }
        return $this->_element;
    }
826420
public function getComponent()
    {
        if (! ($this->_controller instanceof LibBaseControllerAbstract)) {

            $this->_controller = $this->getController();

            if (! $this->_controller instanceof LibBaseControllerAbstract) {
                throw new \UnexpectedValueException(
                    'Dispatcher: '.get_class($this->_controller).' does not implement LibBaseDispatcherAbstract',
                    AnHttpResponse::INTERNAL_SERVER_ERROR
                );
            }
        }

        return $this->_controller;
    }
388768
public function validate($element)
    {
        $docBlock = $element->getDocBlock();
        if (null === $docBlock) {
            throw new \UnexpectedValueException(
                'A DocBlock should be present (and validated) before this validator can be applied'
            );
        }

        if ($docBlock->hasTag('return')) {
            $returnTag = current($docBlock->getTagsByName('return'));
            if ($returnTag->getType() == 'type') {
                return new Error(LogLevel::WARNING, 'PPC:ERR-50017', $element->getLinenumber());
            }
        }

        return null;
    }
358289
public function getTable()
    {
        if (!($this->_table instanceof KDatabaseTableInterface))
        {
            //Make sure we have a table identifier
            if (!($this->_table instanceof KObjectIdentifier)) {
                $this->setTable($this->_table);
            }

            $this->_table = $this->getObject($this->_table);

            if (!($this->_table instanceof KDatabaseTableInterface))
            {
                throw new UnexpectedValueException(
                    'Table: ' . get_class($this->_table) . ' does not implement KDatabaseTableInterface'
                );
            }
        }

        return $this->_table;
    }
533729
public function getAdapter()
    {
        if(!$this->_adapter instanceof KDatabaseAdapterInterface)
        {
            $this->_adapter = $this->getObject($this->_adapter);

            if(!$this->_adapter instanceof KDatabaseAdapterInterface)
            {
                throw new UnexpectedValueException(
                    'Adapter: '.get_class($this->_adapter).' does not implement KDatabaseAdapterInterface'
                );
            }
        }

        return $this->_adapter;
    }
923258
public function getTable()
    {
        if (!($this->_table instanceof DatabaseTableInterface))
        {
            //Make sure we have a table identifier
            if (!($this->_table instanceof ObjectIdentifier)) {
                $this->setTable($this->_table);
            }

            $this->_table = $this->getObject($this->_table);

            if (!($this->_table instanceof DatabaseTableInterface))
            {
                throw new \UnexpectedValueException(
                    'Table: ' . get_class($this->_table) . ' does not implement DatabaseTableInterface'
                );
            }
        }

        return $this->_table;
    }
1089876
public function expectImplicit($expectedTag = null): ImplicitTagging
    {
        $el = $this;
        if (!$el instanceof ImplicitTagging) {
            throw new \UnexpectedValueException(
                "Element doesn't implement implicit tagging.");
        }
        if (isset($expectedTag)) {
            $el->expectTagged($expectedTag);
        }
        return $el;
    }
1322228
public function getValueType()
	{
		if ( $this->Cardinality == XmlTypeCardinality::ZeroOrMore ||
			 $this->Cardinality == XmlTypeCardinality::OneOrMore )
			return "\lyquidity\XPath2\XPath2NodeIterator";

		if ( $this->IsNode )
			return "\lyquidity\xml\xpath\XPathNavigator";

		if ($this->Cardinality == XmlTypeCardinality::One)
			return $this->ItemType;

		return "object";
	}
857944
public function getValue()
    {
        $value = '';

        if (is_array($this->_value)) {
            foreach ($this->_value as $v) {
                if ($v instanceof XMLElement) {
                    $value .= $v->generate();
                } else {
                    $value .= $v;
                }
            }
        } elseif (!is_null($this->_value)) {
            $value = $this->_value;
        }

        return $value;
    }
105749
public function asPrivate(): Tagged\PrivateType
    {
        if (!$this->_element instanceof Tagged\PrivateType) {
            throw new \UnexpectedValueException(
                "Private type expected, got " . $this->_typeDescriptorString());
        }
        return $this->_element;
    }
1099442
public function getHandler()
    {
        if(!$this->_handler instanceof UserSessionHandlerInterface)
        {
            $this->_handler = $this->getObject($this->_handler);

            if(!$this->_handler instanceof UserSessionHandlerInterface)
            {
                throw new \UnexpectedValueException(
                    'Handler: '.get_class($this->_handler).' does not implement UserSessionHandlerInterface'
                );
            }
        }

        return $this->_handler;
    }
515492
protected function initContainer()
    {
        $container = $this->loadContainer(Configuration::projectDir() . $this->config['container']);

        if (!$container instanceof ContainerInterface) {
            throw new \UnexpectedValueException("Failed to get a container from '{$this->config['container']}'");
        }

        return $container;
    }
819980
public function getRequest()
    {
        if(!$this->_request instanceof ControllerRequestInterface)
        {
            //Setup the request
            $this->_request->url  = $this->getIdentifier();
            $this->_request->user = $this->getUser();

            $this->_request = $this->getObject('lib:controller.request', ObjectConfig::unbox($this->_request));

            if(!$this->_request instanceof ControllerRequestInterface)
            {
                throw new \UnexpectedValueException(
                    'Request: '.get_class($this->_request).' does not implement ControllerRequestInterface'
                );
            }
        }

        return $this->_request;
    }