12 if ($element->hasAttribute(
'href')) {
13 return $element->getAttribute(
'href');
15 if ($element->hasAttributeNS(
'http://www.w3.org/1999/xlink',
'href')) {
16 return $element->getAttributeNS(
'http://www.w3.org/1999/xlink',
'href');
27 if (!is_string($href) || strpos($href,
'#') !== 0) {
30 return substr($href, 1);
40 if ($needle === $haystack) {
43 foreach ($haystack->childNodes as $childNode) {
47 if (self::isElementContainedIn($needle, $childNode)) {
static getElementHref(\DOMElement $element)
static extractIdReferenceFromHref($href)
static isElementContainedIn(\DOMElement $needle, \DOMElement $haystack)