DOMText
class DOMText extends DOMCharacterData (View source)
The DOMText class inherits from
Constants
DOCUMENT_POSITION_DISCONNECTED
Since: 8.4
|
|
DOCUMENT_POSITION_PRECEDING
Since: 8.4
|
|
DOCUMENT_POSITION_FOLLOWING
Since: 8.4
|
|
DOCUMENT_POSITION_CONTAINS
Since: 8.4
|
|
DOCUMENT_POSITION_CONTAINED_BY
Since: 8.4
|
|
DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
Since: 8.4
|
|
Properties
string | $nodeName | from DOMNode | |
string|null | $nodeValue | from DOMNode | |
int | $nodeType | from DOMNode | |
DOMNode|null | $parentNode | from DOMNode | |
DOMNode> | $childNodes | from DOMNode | |
DOMNode|null | $firstChild | from DOMNode | |
DOMNode|null | $lastChild | from DOMNode | |
DOMNode|null | $previousSibling | from DOMNode | |
DOMNode|null | $nextSibling | from DOMNode | |
DOMAttr>|null | $attributes | from DOMNode | |
DOMDocument|null | $ownerDocument | from DOMNode | |
string|null | $namespaceURI | from DOMNode | |
string|null | $prefix | from DOMNode | |
string|null | $localName | from DOMNode | |
string|null | $baseURI | from DOMNode | |
string | $textContent | from DOMNode | |
bool | $isConnected | from DOMNode | |
DOMElement|null | $parentElement | from DOMNode | |
string | $data | from DOMCharacterData | |
int | $length | from DOMCharacterData | |
$nextElementSibling | from DOMCharacterData | ||
$previousElementSibling | from DOMCharacterData | ||
$wholeText | Holds all the text of logically-adjacent (not separated by Element, Comment or Processing Instruction) Text nodes. |
Methods
Checks if feature is supported for specified version
Gets the namespace prefix of the node based on the namespace URI
Checks if the specified namespaceURI is the default namespace or not
Gets the namespace URI of the node based on the prefix
Gets the namespace URI of the node based on the prefix
Canonicalize nodes to a string
Canonicalize nodes to a file.
Extracts a range of data from the node
Append the string to the end of the character data of the node
Insert a string at the specified 16-bit unit offset
Remove a range of characters from the node
Replace a substring within the DOMCharacterData node
Replace current node with new node(s), a combination of {DOMChildNode::remove()} + {DOMChildNode::append()}.
Indicates whether this text node contains whitespace
No description
No description
Creates a new
Details
DOMNode
insertBefore(DOMNode $node, null|DOMNode $child = null)
Adds a new child before a reference node
bool
hasChildNodes()
Checks if node has children
DOMNode
cloneNode(bool $deep = false)
Clones a node
void
normalize()
Normalizes the node
bool
isSupported(string $feature, string $version)
Checks if feature is supported for specified version
bool
hasAttributes()
Checks if node has attributes
int
compareDocumentPosition(DOMNode $other)
No description
bool
isSameNode(DOMNode $otherNode)
Indicates if two nodes are the same node
string|null
lookupPrefix(string $namespace)
Gets the namespace prefix of the node based on the namespace URI
bool
isDefaultNamespace(string $namespace)
Checks if the specified namespaceURI is the default namespace or not
string|null
lookupNamespaceURI(string|null $prefix)
Gets the namespace URI of the node based on the prefix
string|null
lookupNamespaceUri(string|null $prefix)
Gets the namespace URI of the node based on the prefix
bool
isEqualNode($otherNode)
No description
getFeature($feature, $version)
No description
setUserData($key, $data, $handler)
No description
getUserData($key)
No description
string|null
getNodePath()
Gets an XPath location path for the node
int
getLineNo()
Get line number for a node
string|false
C14N(bool $exclusive = false, bool $withComments = false, null|array $xpath = null, null|array $nsPrefixes = null)
Canonicalize nodes to a string
int|false
C14NFile(string $uri, bool $exclusive = false, bool $withComments = false, null|array $xpath = null, null|array $nsPrefixes = null)
Canonicalize nodes to a file.
bool
contains(DOMNode|DOMNameSpaceNode|null $other)
No description
DOMNode
getRootNode(array|null $options = null)
No description
array
__sleep()
No description
void
__wakeup()
No description
string
substringData(int $offset, int $count)
Extracts a range of data from the node
appendData(string $data)
Append the string to the end of the character data of the node
bool
insertData(int $offset, string $data)
Insert a string at the specified 16-bit unit offset
bool
deleteData(int $offset, int $count)
Remove a range of characters from the node
bool
replaceData(int $offset, int $count, string $data)
Replace a substring within the DOMCharacterData node
void
remove()
Acts as a simpler version of {DOMNode
void
before(DOMNode|string|null ...$nodes)
Add passed node(s) before the current node
void
after(DOMNode|string|null ...$nodes)
Add passed node(s) after the current node
void
replaceWith(DOMNode|string|null ...$nodes)
Replace current node with new node(s), a combination of {DOMChildNode::remove()} + {DOMChildNode::append()}.
DOMText
splitText(int $offset)
Breaks this node into two nodes at the specified offset
bool
isWhitespaceInElementContent()
Indicates whether this text node contains whitespace
bool
isElementContentWhitespace()
No description
replaceWholeText($content)
No description
__construct(string $data = '')
Creates a new