Get the wrapped element as a graphic string type.

@throws \UnexpectedValueException If the element is not a graphic string
@return \ASN1\Type\Primitive\GraphicString
162684
public function asGraphicString(): Primitive\GraphicString
    {
        if (!$this->_element instanceof Primitive\GraphicString) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_GRAPHIC_STRING));
        }
        return $this->_element;
    }
1355799
protected function renderValue()
    {
        if ($this->withTooltip || ! $this->withTitle)
            return $this->renderIcon();

        return $this->withIcon
            ? $this->renderIcon().' '.$this->getTitle()
            : $this->getTitle();
    }
1105116
public function asGeneralString(): Primitive\GeneralString
    {
        if (!$this->_element instanceof Primitive\GeneralString) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_GENERAL_STRING));
        }
        return $this->_element;
    }
101791
public function asApplication(): Tagged\ApplicationType
    {
        if (!$this->_element instanceof Tagged\ApplicationType) {
            throw new \UnexpectedValueException(
                "Application type expected, got " .
                $this->_typeDescriptorString());
        }
        return $this->_element;
    }
1285216
public function getElementPrototype()
    {
        if ($this->elementPrototype === NULL) {
            $this->elementPrototype = Html::el('a')
                ->setClass(['grid-button-' . $this->getName()])
                ->setText($this->label);
        }

        if (isset($this->elementPrototype->class)) {
            $this->elementPrototype->class = (array) $this->elementPrototype->class;
        }

        return $this->elementPrototype;
    }
1319486
public function setStringValue($stringValue)
    {
        if (\is_array($stringValue) || \is_object($stringValue)) {
            $m = "Invalid value type for attribute {$this->getFamilyCode()}.{$this->getAttributeCode()}, ";
            $m .= 'expecting string, got '.gettype($stringValue);
            throw new \UnexpectedValueException($m);
        }
        if (null !== $stringValue && 255 < \mb_strlen($stringValue)) {
            $stringValue = mb_substr($stringValue, 0, 255);
        }
        $this->stringValue = null === $stringValue ? null : (string) $stringValue;

        return $this;
    }
1154860
public function getHeader()
	{
		if (!$this->getOption('key'))
		{
			throw new UnexpectedValueException('A Google Maps API key is required.');
		}

		$zoom = $this->getZoom();
		$center = $this->getCenter();
		$maptype = $this->getMapType();
		$id = $this->getMapID();
		$scheme = $this->isSecure() ? 'https' : 'http';
		$key = $this->getKey();
		$sensor = $this->hasSensor() ? 'true' : 'false';

		$setup = 'var mapOptions = {';
		$setup .= "zoom: {$zoom},";
		$setup .= "center: new google.maps.LatLng({$center[0]},{$center[1]}),";
		$setup .= "mapTypeId: google.maps.MapTypeId.{$maptype},";
		$setup .= substr(json_encode($this->getAdditionalMapOptions()), 1, -1);
		$setup .= '};';
		$setup .= "var map = new google.maps.Map(document.getElementById('{$id}'), mapOptions);";

		foreach ($this->listMarkers() as $marker)
		{
			$loc = $marker['loc'];
			$title = $marker['title'];
			$options = $marker['options'];

			$setup .= 'new google.maps.Marker({';
			$setup .= "position: new google.maps.LatLng({$loc[0]},{$loc[1]}),";
			$setup .= 'map: map,';
			$setup .= "title:'{$title}',";
			$setup .= substr(json_encode($options), 1, -1);
			$setup .= '});';
		}

		$setup .= $this->getAdditionalJavascript();

		if ($this->isAsync())
		{
			$asynccallback = $this->getAsyncCallback();

			$output = '<script type="text/javascript">';
			$output .= "function {$asynccallback}() {";
			$output .= $setup;
			$output .= '}';

			$onload = "function() {";
			$onload .= 'var script = document.createElement("script");';
			$onload .= 'script.type = "text/javascript";';
			$onload .= "script.src = '{$scheme}://maps.googleapis.com/maps/api/js?key={$key}&sensor={$sensor}&callback={$asynccallback}';";
			$onload .= 'document.body.appendChild(script);';
			$onload .= '}';
		}
		else
		{
			$output = "<script type='text/javascript' src='{$scheme}://maps.googleapis.com/maps/api/js?key={$key}&sensor={$sensor}'>";
			$output .= '</script>';
			$output .= '<script type="text/javascript">';

			$onload = "function() {";
			$onload .= $setup;
			$onload .= '}';
		}

		switch ($this->getAutoload())
		{
			case 'onload':
				$output .= "window.onload={$onload};";
				break;

			case 'jquery':
				$output .= "$(document).ready({$onload});";
				break;

			case 'mootools':
				$output .= "window.addEvent('domready',{$onload});";
				break;
		}

		$output .= '</script>';

		return $output;
	}
1038741
public function getRawMimeDirValue()
    {
        if (is_array($this->value)) {
            $value = $this->value[0];
        } else {
            $value = $this->value;
        }

        return strtr($value, [',' => '\,']);
    }
832056
public function getExceptionHandler()
    {
        if(!$this->__exception_handler instanceof KExceptionHandlerInterface)
        {
            $this->__exception_handler = $this->getObject($this->__exception_handler);

            if(!$this->__exception_handler instanceof KExceptionHandler)
            {
                throw new UnexpectedValueException(
                    'Exception Handler: '.get_class($this->__exception_handler).' does not implement KExceptionHandlerInterface'
                );
            }
        }

        return $this->__exception_handler;
    }
875638
public function getTemplate()
    {
        if (!$this->_template instanceof KTemplateInterface)
        {
            //Make sure we have a template identifier
            if (!($this->_template instanceof KObjectIdentifier)) {
                $this->setTemplate($this->_template);
            }

            $options = array(
                'filters'   => $this->getConfig()->template_filters,
                'functions' => $this->getConfig()->template_functions,
            );

            $this->_template = $this->getObject($this->_template, $options);

            if(!$this->_template instanceof KTemplateInterface)
            {
                throw new UnexpectedValueException(
                    'Template: '.get_class($this->_template).' does not implement KTemplateInterface'
                );
            }
        }

        return $this->_template;
    }
1185999
function ToString()
    {
        $result = (string)$this->type;
        if ($this->value)
        {
            $result .= '=' . $this->value;
        }
        return $result;
    }
564700
public function asBMPString(): Primitive\BMPString
    {
        if (!$this->_element instanceof Primitive\BMPString) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_BMP_STRING));
        }
        return $this->_element;
    }
352090
public function asCharacterString(): Primitive\CharacterString
    {
        if (!$this->_element instanceof Primitive\CharacterString) {
            throw new \UnexpectedValueException(
                $this->_generateExceptionMessage(Element::TYPE_CHARACTER_STRING));
        }
        return $this->_element;
    }
77654
public function getNoncer()
    {
        if (!isset($this->noncer)) {
            $this->noncer = new self::$defaultNoncerClass($this->noncerLength);
            if (!$this->noncer instanceof NoncerInterface) {
                throw new \UnexpectedValueException('Noncer must implement Acquia\Rest\NoncerInterface');
            }
        }
        return $this->noncer;
    }
1364486
protected function getUserObjectGuid()
    {
        $guid = $this->user->getConvertedGuid();

        if (trim($guid) == false) {
            $attribute = $this->user->getSchema()->objectGuid();

            throw new UnexpectedValueException(
                "Unable to locate a user without a {$attribute}"
            );
        }

        return $guid;
    }
1051290
public function getModel()
    {
        if(!$this->_model instanceof ModelInterface)
        {
            $this->_model = $this->getObject($this->_model);

            if(!$this->_model instanceof ModelInterface)
            {
                throw new \UnexpectedValueException(
                    'Model: '.get_class($this->_model).' does not implement ModelInterface'
                );
            }

            //Inject the request into the model state
            $this->_model->setState($this->getRequest()->query->toArray());
        }

        return $this->_model;
    }
21698
public function getAtomizedValueType()
	{
		if ( $this->IsNode )
		{
			switch ( $this->TypeCode )
			{
				case XmlTypeCode::Text:
				case XmlTypeCode::ProcessingInstruction:
				case XmlTypeCode::Comment:
				case XmlTypeCode::UntypedAtomic:
					return Types::$UntypedAtomicType;

				default:

					if ( ! is_null( $this->SchemaType ) )
						return $this->SchemaType->Datatype->ValueType;
					else if ( ! is_null( $this->SchemaElement ) )
					{
						if ( ! is_null( $this->SchemaElement->ElementSchemaType ) && ! is_null( $this->SchemaElement->ElementSchemaType->Datatype ) )
							return $this->SchemaElement->ElementSchemaType->Datatype->ValueType;
					}
					else if ( ! is_null( $this->SchemaAttribute ) )
					{
						if ( ! is_null( $this->SchemaAttribute->AttributeSchemaType ) && ! is_null( $this->SchemaAttribute->AttributeSchemaType->Datatype ) )
							return $this->SchemaAttribute->AttributeSchemaType->Datatype->ValueType;
					}
					return Types::$UntypedAtomicType;
			}
		}
		else
			return $this->ItemType;
	}