Definition at line 4 of file XPath.php.
◆ __construct()
enshrined\svgSanitize\data\XPath::__construct |
( |
\DOMDocument |
$doc | ) |
|
◆ createNodeName()
enshrined\svgSanitize\data\XPath::createNodeName |
( |
|
$nodeName | ) |
|
- Parameters
-
- Returns
- string
Definition at line 23 of file XPath.php.
25 if (empty($this->defaultNamespaceURI)) {
28 return self::DEFAULT_NAMESPACE_PREFIX .
':' . $nodeName;
◆ handleDefaultNamespace()
enshrined\svgSanitize\data\XPath::handleDefaultNamespace |
( |
| ) |
|
|
protected |
Definition at line 31 of file XPath.php.
References string.
Referenced by enshrined\svgSanitize\data\XPath\__construct().
33 $rootElements = $this->getRootElements();
35 if (count($rootElements) !== 1) {
36 throw new \LogicException(
37 sprintf(
'Got %d svg elements, expected exactly one', count($rootElements)),
41 $this->defaultNamespaceURI = (
string)$rootElements[0]->namespaceURI;
43 if ($this->defaultNamespaceURI !==
'') {
44 $this->registerNamespace(self::DEFAULT_NAMESPACE_PREFIX, $this->defaultNamespaceURI);
◆ $defaultNamespaceURI
enshrined\svgSanitize\data\XPath::$defaultNamespaceURI |
|
protected |
◆ DEFAULT_NAMESPACE_PREFIX
const enshrined\svgSanitize\data\XPath::DEFAULT_NAMESPACE_PREFIX = 'svg' |
The documentation for this class was generated from the following file:
- libs/composer/vendor/enshrined/svg-sanitize/src/data/XPath.php