You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.4 KiB
52 lines
1.4 KiB
3 years ago
|
<?php
|
||
|
/**
|
||
|
* @license MIT
|
||
|
* Copyright 2017 Dustin Wilson, J. King, et al.
|
||
|
* See LICENSE and AUTHORS files for details
|
||
|
*/
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
namespace MensBeam\HTML\DOM;
|
||
|
|
||
|
|
||
|
class Attr extends Node {
|
||
|
protected function __get_localName(): string {
|
||
|
// PHP's DOM does this correctly already.
|
||
|
return $this->innerNode->localName;
|
||
|
}
|
||
|
|
||
|
protected function __get_name(): string {
|
||
|
// PHP's DOM does this correctly already.
|
||
|
return $this->innerNode->name;
|
||
|
}
|
||
|
|
||
|
protected function __get_namespaceURI(): string {
|
||
|
// PHP's DOM does this correctly already.
|
||
|
return $this->innerNode->namespaceURI;
|
||
|
}
|
||
|
|
||
|
protected function __get_ownerElement(): Element {
|
||
|
// PHP's DOM does this correctly already.
|
||
|
return $this->innerNode->ownerDocument->getWrapperNode($this->innerNode->ownerElement);
|
||
|
}
|
||
|
|
||
|
protected function __get_prefix(): string {
|
||
|
// PHP's DOM does this correctly already.
|
||
|
return $this->innerNode->prefix;
|
||
|
}
|
||
|
|
||
|
protected function __get_specified(): bool {
|
||
|
# Useless, always returns true
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
protected function __get_value(): string {
|
||
|
// PHP's DOM does this correctly already.
|
||
|
return $this->innerNode->value;
|
||
|
}
|
||
|
|
||
|
protected function __set_value(string $value) {
|
||
|
// PHP's DOM does this correctly already.
|
||
|
$this->innerNode->value = $value;
|
||
|
}
|
||
|
}
|