| 1 | <?php |
||
| 5 | class NameSpaceHandler extends AttributeHandler |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var \DOMNameSpaceNode |
||
| 9 | */ |
||
| 10 | protected $nodeNameSpace; |
||
| 11 | /** |
||
| 12 | * @param \DOMNameSpaceNode $nameSpaceNode |
||
| 13 | * @param AbstractDomDocumentHandler $domDocumentHandler |
||
| 14 | * @param int $index |
||
| 15 | */ |
||
| 16 | 18 | public function __construct(\DOMNameSpaceNode $nameSpaceNode, AbstractDomDocumentHandler $domDocumentHandler, $index = -1) |
|
| 17 | { |
||
| 18 | 18 | parent::__construct(new \DOMAttr($nameSpaceNode->nodeName, $nameSpaceNode->nodeValue), $domDocumentHandler, $index); |
|
| 19 | 18 | $this->nodeNameSpace = $nameSpaceNode; |
|
| 20 | 18 | } |
|
| 21 | /** |
||
| 22 | * value is always with [http|https]:// so we need to keep the full value |
||
| 23 | * @param bool $withNamespace |
||
| 24 | * @param bool $withinItsType |
||
| 25 | * @param string $asType |
||
| 26 | * @return mixed |
||
| 27 | */ |
||
| 28 | 6 | public function getValue($withNamespace = false, $withinItsType = true, $asType = null) |
|
| 29 | { |
||
| 30 | 6 | return parent::getValue(true, $withinItsType, $asType); |
|
| 31 | } |
||
| 32 | /** |
||
| 33 | * @return null|string |
||
| 34 | */ |
||
| 35 | 6 | public function getValueNamespace() |
|
| 36 | { |
||
| 37 | 6 | return null; |
|
| 38 | } |
||
| 39 | } |
||
| 40 |