Newscoop\Service\Implementation\ThemeServiceLocalFileSystem::readAttribute PHP 메소드

readAttribute() 보호된 메소드

This method will throw an exception in case the attribute is not specified.
protected readAttribute ( SimpleXMLElement $node, string $attribute ) : string
$node SimpleXMLElement The node to read from, *(not null not empty).
$attribute string The attribute name, *(not null not empty).
리턴 string The attribute value, not null.
    protected function readAttribute(\SimpleXMLElement $node, $attribute)
    {
        $value = $node[$attribute];
        if (!isset($value)) {
            throw new XMLMissingAttribueException($attribute);
        }
        return $value;
    }