php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
Dom\Element Class Reference
Inheritance diagram for Dom\Element:
Dom\Node Dom\ParentNode Dom\ChildNode Dom\HTMLElement

Public Member Functions

 hasAttributes ()
 
 getAttributeNames ()
 
 getAttribute (string $qualifiedName)
 
 getAttributeNS (?string $namespace, string $localName)
 
 setAttribute (string $qualifiedName, string $value)
 
 setAttributeNS (?string $namespace, string $qualifiedName, string $value)
 
 removeAttribute (string $qualifiedName)
 
 removeAttributeNS (?string $namespace, string $localName)
 
 toggleAttribute (string $qualifiedName, ?bool $force=null)
 
 hasAttribute (string $qualifiedName)
 
 hasAttributeNS (?string $namespace, string $localName)
 
 getAttributeNode (string $qualifiedName)
 
 getAttributeNodeNS (?string $namespace, string $localName)
 
 setAttributeNode (Attr $attr)
 
 setAttributeNodeNS (Attr $attr)
 
 removeAttributeNode (Attr $attr)
 
 getElementsByTagName (string $qualifiedName)
 
 getElementsByTagNameNS (?string $namespace, string $localName)
 
 insertAdjacentElement (AdjacentPosition $where, Element $element)
 
 insertAdjacentText (AdjacentPosition $where, string $data)
 
 setIdAttribute (string $qualifiedName, bool $isId)
 
 setIdAttributeNS (?string $namespace, string $qualifiedName, bool $isId)
 
 setIdAttributeNode (Attr $attr, bool $isId)
 
 remove ()
 
 before (Node|string ... $nodes)
 
 after (Node|string ... $nodes)
 
 replaceWith (Node|string ... $nodes)
 
 append (Node|string ... $nodes)
 
 prepend (Node|string ... $nodes)
 
 replaceChildren (Node|string ... $nodes)
 
 querySelector (string $selectors)
 
 querySelectorAll (string $selectors)
 
 closest (string $selectors)
 
 matches (string $selectors)
 
 getInScopeNamespaces ()
 
 getDescendantNamespaces ()
 
 rename (?string $namespaceURI, string $qualifiedName)
 
- Public Member Functions inherited from Dom\Node
 getRootNode (array $options=[])
 
 hasChildNodes ()
 
 normalize ()
 
 cloneNode (bool $deep=false)
 
 isEqualNode (?Node $otherNode)
 
 isSameNode (?Node $otherNode)
 
 compareDocumentPosition (Node $other)
 
 contains (?Node $other)
 
 lookupPrefix (?string $namespace)
 
 lookupNamespaceURI (?string $prefix)
 
 isDefaultNamespace (?string $namespace)
 
 insertBefore (Node $node, ?Node $child)
 
 appendChild (Node $node)
 
 replaceChild (Node $node, Node $child)
 
 removeChild (Node $child)
 
 getLineNo ()
 
 getNodePath ()
 
 C14N (bool $exclusive=false, bool $withComments=false, ?array $xpath=null, ?array $nsPrefixes=null)
 
 C14NFile (string $uri, bool $exclusive=false, bool $withComments=false, ?array $xpath=null, ?array $nsPrefixes=null)
 
 __sleep ()
 
 __wakeup ()
 

Data Fields

string $namespaceURI
 
string $prefix
 
string $localName
 
string $tagName
 
string $id
 
string $className
 
TokenList $classList
 
NamedNodeMap $attributes
 
Element $firstElementChild
 
Element $lastElementChild
 
int $childElementCount
 
Element $previousElementSibling
 
Element $nextElementSibling
 
string $innerHTML
 
string $substitutedNodeValue
 
- Data Fields inherited from Dom\Node
int $nodeType
 
string $nodeName
 
string $baseURI
 
bool $isConnected
 
Document $ownerDocument
 
Node $parentNode
 
Element $parentElement
 
NodeList $childNodes
 
Node $firstChild
 
Node $lastChild
 
Node $previousSibling
 
Node $nextSibling
 
string $nodeValue
 
string $textContent
 
const int DOCUMENT_POSITION_DISCONNECTED = 0x01
 
const int DOCUMENT_POSITION_PRECEDING = 0x02
 
const int DOCUMENT_POSITION_FOLLOWING = 0x04
 
const int DOCUMENT_POSITION_CONTAINS = 0x08
 
const int DOCUMENT_POSITION_CONTAINED_BY = 0x10
 
const int DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20
 

Detailed Description

Definition at line 1563 of file php_dom.stub.php.

Member Function Documentation

◆ after()

Dom\Element::after ( Node|string ... $nodes)

@implementation-alias DOMElement\after

Implements Dom\ChildNode.

Definition at line 1672 of file php_dom.stub.php.

◆ append()

Dom\Element::append ( Node|string ... $nodes)

@implementation-alias DOMElement\append

Implements Dom\ParentNode.

Definition at line 1676 of file php_dom.stub.php.

◆ before()

Dom\Element::before ( Node|string ... $nodes)

@implementation-alias DOMElement\before

Implements Dom\ChildNode.

Definition at line 1670 of file php_dom.stub.php.

◆ closest()

Dom\Element::closest ( string $selectors)

Definition at line 1684 of file php_dom.stub.php.

◆ getAttribute()

Dom\Element::getAttribute ( string $qualifiedName)

@implementation-alias DOMElement\getAttribute

Definition at line 1603 of file php_dom.stub.php.

◆ getAttributeNames()

Dom\Element::getAttributeNames ( )

@implementation-alias DOMElement\getAttributeNames

Definition at line 1601 of file php_dom.stub.php.

◆ getAttributeNode()

Dom\Element::getAttributeNode ( string $qualifiedName)

@implementation-alias DOMElement\getAttributeNode

Definition at line 1621 of file php_dom.stub.php.

◆ getAttributeNodeNS()

Dom\Element::getAttributeNodeNS ( ?string $namespace,
string $localName )

@implementation-alias DOMElement\getAttributeNodeNS

Definition at line 1623 of file php_dom.stub.php.

◆ getAttributeNS()

Dom\Element::getAttributeNS ( ?string $namespace,
string $localName )

@implementation-alias DOMElement\getAttributeNS

Definition at line 1605 of file php_dom.stub.php.

◆ getDescendantNamespaces()

Dom\Element::getDescendantNamespaces ( )
Returns
list<NamespaceInfo>

Definition at line 1697 of file php_dom.stub.php.

◆ getElementsByTagName()

Dom\Element::getElementsByTagName ( string $qualifiedName)

Definition at line 1629 of file php_dom.stub.php.

◆ getElementsByTagNameNS()

Dom\Element::getElementsByTagNameNS ( ?string $namespace,
string $localName )

Definition at line 1630 of file php_dom.stub.php.

◆ getInScopeNamespaces()

Dom\Element::getInScopeNamespaces ( )
Returns
list<NamespaceInfo>

Definition at line 1694 of file php_dom.stub.php.

◆ hasAttribute()

Dom\Element::hasAttribute ( string $qualifiedName)

@implementation-alias DOMElement\hasAttribute

Definition at line 1616 of file php_dom.stub.php.

◆ hasAttributeNS()

Dom\Element::hasAttributeNS ( ?string $namespace,
string $localName )

@implementation-alias DOMElement\hasAttributeNS

Definition at line 1618 of file php_dom.stub.php.

◆ hasAttributes()

Dom\Element::hasAttributes ( )

@implementation-alias DOMNode\hasAttributes

Definition at line 1594 of file php_dom.stub.php.

◆ insertAdjacentElement()

Dom\Element::insertAdjacentElement ( AdjacentPosition $where,
Element $element )

Definition at line 1632 of file php_dom.stub.php.

◆ insertAdjacentText()

Dom\Element::insertAdjacentText ( AdjacentPosition $where,
string $data )

Definition at line 1633 of file php_dom.stub.php.

◆ matches()

Dom\Element::matches ( string $selectors)

Definition at line 1685 of file php_dom.stub.php.

◆ prepend()

Dom\Element::prepend ( Node|string ... $nodes)

@implementation-alias DOMElement\prepend

Implements Dom\ParentNode.

Definition at line 1678 of file php_dom.stub.php.

◆ querySelector()

Dom\Element::querySelector ( string $selectors)

Implements Dom\ParentNode.

Definition at line 1682 of file php_dom.stub.php.

◆ querySelectorAll()

Dom\Element::querySelectorAll ( string $selectors)

Implements Dom\ParentNode.

Definition at line 1683 of file php_dom.stub.php.

◆ remove()

Dom\Element::remove ( )

@implementation-alias DOMElement\remove

Implements Dom\ChildNode.

Definition at line 1668 of file php_dom.stub.php.

◆ removeAttribute()

Dom\Element::removeAttribute ( string $qualifiedName)

Definition at line 1610 of file php_dom.stub.php.

◆ removeAttributeNode()

Dom\Element::removeAttributeNode ( Attr $attr)

Definition at line 1627 of file php_dom.stub.php.

◆ removeAttributeNS()

Dom\Element::removeAttributeNS ( ?string $namespace,
string $localName )

@implementation-alias DOMElement\removeAttributeNS

Definition at line 1612 of file php_dom.stub.php.

◆ rename()

Dom\Element::rename ( ?string $namespaceURI,
string $qualifiedName )

Definition at line 1699 of file php_dom.stub.php.

◆ replaceChildren()

Dom\Element::replaceChildren ( Node|string ... $nodes)

@implementation-alias DOMElement\replaceChildren

Implements Dom\ParentNode.

Definition at line 1680 of file php_dom.stub.php.

◆ replaceWith()

Dom\Element::replaceWith ( Node|string ... $nodes)

@implementation-alias DOMElement\replaceWith

Implements Dom\ChildNode.

Definition at line 1674 of file php_dom.stub.php.

◆ setAttribute()

Dom\Element::setAttribute ( string $qualifiedName,
string $value )

@implementation-alias DOMElement\setAttribute

Definition at line 1607 of file php_dom.stub.php.

◆ setAttributeNode()

Dom\Element::setAttributeNode ( Attr $attr)

@implementation-alias Dom\Element::setAttributeNodeNS

Definition at line 1625 of file php_dom.stub.php.

◆ setAttributeNodeNS()

Dom\Element::setAttributeNodeNS ( Attr $attr)

Definition at line 1626 of file php_dom.stub.php.

◆ setAttributeNS()

Dom\Element::setAttributeNS ( ?string $namespace,
string $qualifiedName,
string $value )

@implementation-alias DOMElement\setAttributeNS

Definition at line 1609 of file php_dom.stub.php.

◆ setIdAttribute()

Dom\Element::setIdAttribute ( string $qualifiedName,
bool $isId )

@implementation-alias DOMElement\setIdAttribute

Definition at line 1662 of file php_dom.stub.php.

◆ setIdAttributeNode()

Dom\Element::setIdAttributeNode ( Attr $attr,
bool $isId )

Definition at line 1665 of file php_dom.stub.php.

◆ setIdAttributeNS()

Dom\Element::setIdAttributeNS ( ?string $namespace,
string $qualifiedName,
bool $isId )

@implementation-alias DOMElement\setIdAttributeNS

Definition at line 1664 of file php_dom.stub.php.

◆ toggleAttribute()

Dom\Element::toggleAttribute ( string $qualifiedName,
?bool $force = null )

@implementation-alias DOMElement\toggleAttribute

Definition at line 1614 of file php_dom.stub.php.

Field Documentation

◆ $attributes

NamedNodeMap Dom\Element::$attributes

@readonly @virtual

Definition at line 1599 of file php_dom.stub.php.

◆ $childElementCount

int Dom\Element::$childElementCount

@readonly @virtual

Definition at line 1649 of file php_dom.stub.php.

◆ $classList

TokenList Dom\Element::$classList

@readonly

Definition at line 1591 of file php_dom.stub.php.

◆ $className

string Dom\Element::$className

@virtual

Definition at line 1589 of file php_dom.stub.php.

◆ $firstElementChild

Element Dom\Element::$firstElementChild

@readonly @virtual

Definition at line 1639 of file php_dom.stub.php.

◆ $id

string Dom\Element::$id

@virtual

Definition at line 1587 of file php_dom.stub.php.

◆ $innerHTML

string Dom\Element::$innerHTML

@virtual

Definition at line 1688 of file php_dom.stub.php.

◆ $lastElementChild

Element Dom\Element::$lastElementChild

@readonly @virtual

Definition at line 1644 of file php_dom.stub.php.

◆ $localName

string Dom\Element::$localName

@readonly @virtual

Definition at line 1579 of file php_dom.stub.php.

◆ $namespaceURI

string Dom\Element::$namespaceURI

@readonly @virtual

Definition at line 1569 of file php_dom.stub.php.

◆ $nextElementSibling

Element Dom\Element::$nextElementSibling

@readonly @virtual

Definition at line 1659 of file php_dom.stub.php.

◆ $prefix

string Dom\Element::$prefix

@readonly @virtual

Definition at line 1574 of file php_dom.stub.php.

◆ $previousElementSibling

Element Dom\Element::$previousElementSibling

@readonly @virtual

Definition at line 1654 of file php_dom.stub.php.

◆ $substitutedNodeValue

string Dom\Element::$substitutedNodeValue

@virtual

Definition at line 1691 of file php_dom.stub.php.

◆ $tagName

string Dom\Element::$tagName

@readonly @virtual

Definition at line 1584 of file php_dom.stub.php.


The documentation for this class was generated from the following file: