Methods
|
public
PHPHtmlParser\Dom\AbstractNode
::
__construct
()
Creates a unique id for this node.
|
public
PHPHtmlParser\Dom\AbstractNode
::
__destruct
()
Attempts to clear out any object references.
|
public
PHPHtmlParser\Dom\AbstractNode
::
__get
(
string
$key
)
Magic get method for attributes and certain methods.
|
public
PHPHtmlParser\Dom\AbstractNode
::
__toString
() :
string
Simply calls the outer text method.
|
public
addChild
(
PHPHtmlParser\Dom\AbstractNode
$child
,
int
$before
=
-1
) :
bool
Adds a child node to this node and returns the id of the child for this
parent.
-
return
bool
-
throws
ChildNotFoundException
-
throws
CircularException
|
public
PHPHtmlParser\Dom\AbstractNode
::
ancestorByTag
(
string
$tag
) :
PHPHtmlParser\Dom\AbstractNode
Function to locate a specific ancestor tag in the path to the root.
|
public
PHPHtmlParser\Dom\ArrayNode
::
count
() :
int
Returns the count of the iterator array.
|
public
countChildren
() :
int
|
public
PHPHtmlParser\Dom\AbstractNode
::
delete
()
Removes this node and all its children from the
DOM tree.
|
public
PHPHtmlParser\Dom\AbstractNode
::
find
(
string
$selector
,
?
int
$nth
=
NULL
,
bool
$depthFirst
=
false
)
Find elements by css selector
|
public
PHPHtmlParser\Dom\AbstractNode
::
findById
(
int
$id
)
|
public
firstChild
() :
PHPHtmlParser\Dom\AbstractNode
Shortcut to return the first child.
|
public
PHPHtmlParser\Dom\AbstractNode
::
getAncestor
(
int
$id
)
Attempts to get an ancestor node by the given id.
|
public
PHPHtmlParser\Dom\AbstractNode
::
getAttribute
(
string
$key
) : ?
string
A wrapper method that simply calls the getAttribute method
on the tag of this node.
|
public
PHPHtmlParser\Dom\AbstractNode
::
getAttributes
() :
array
A wrapper method that simply calls the getAttribute method
on the tag of this node.
|
public
getChild
(
int
$id
) :
PHPHtmlParser\Dom\AbstractNode
|
public
getChildren
() :
array
Returns a new array of child nodes
|
public
PHPHtmlParser\Dom\ArrayNode
::
getIterator
() :
ArrayIterator
|
public
PHPHtmlParser\Dom\AbstractNode
::
getParent
()
Returns the parent of node.
|
public
PHPHtmlParser\Dom\AbstractNode
::
getTag
() :
PHPHtmlParser\Dom\Tag
Gets the tag object of this node.
|
public
PHPHtmlParser\Dom\AbstractNode
::
hasAttribute
(
string
$key
) :
bool
A wrapper method that simply calls the hasAttribute method
on the tag of this node.
|
public
hasChildren
() :
bool
Checks if this node has children.
|
public
hasNextChild
(
int
$id
)
Check if has next Child
-
return
mixed
-
throws
ChildNotFoundException
|
public
PHPHtmlParser\Dom\AbstractNode
::
hasNextSibling
() :
bool
Checks if the current node has a next sibling.
|
public
PHPHtmlParser\Dom\AbstractNode
::
id
() :
int
Returns the id of this object.
|
public
abstract
PHPHtmlParser\Dom\AbstractNode
::
innerHtml
() :
string
Gets the inner html of this node.
|
public
insertAfter
(
PHPHtmlParser\Dom\AbstractNode
$child
,
int
$id
) :
bool
Insert element before after with provided id
-
return
bool
-
throws
ChildNotFoundException
-
throws
CircularException
|
public
insertBefore
(
PHPHtmlParser\Dom\AbstractNode
$child
,
int
$id
) :
bool
Insert element before child with provided id
-
return
bool
-
throws
ChildNotFoundException
-
throws
CircularException
|
public
PHPHtmlParser\Dom\AbstractNode
::
isAncestor
(
int
$id
) :
bool
Checks if the given node id is an ancestor of
the current node.
|
public
isChild
(
int
$id
) :
bool
Checks if the given node id is a child of the
current node.
|
public
isDescendant
(
int
$id
) :
bool
Checks if the given node id is a descendant of the
current node.
|
public
PHPHtmlParser\Dom\AbstractNode
::
isTextNode
() :
bool
Check is node type textNode
|
public
lastChild
() :
PHPHtmlParser\Dom\AbstractNode
Attempts to get the last child.
|
public
nextChild
(
int
$id
) :
PHPHtmlParser\Dom\AbstractNode
Attempts to get the next child.
|
public
PHPHtmlParser\Dom\AbstractNode
::
nextSibling
() :
PHPHtmlParser\Dom\AbstractNode
Attempts to get the next sibling.
|
public
abstract
PHPHtmlParser\Dom\AbstractNode
::
outerHtml
() :
string
Gets the html of this node, including it's own
tag.
|
public
previousChild
(
int
$id
) :
PHPHtmlParser\Dom\AbstractNode
Attempts to get the previous child.
|
public
PHPHtmlParser\Dom\AbstractNode
::
previousSibling
() :
PHPHtmlParser\Dom\AbstractNode
Attempts to get the previous sibling.
|
public
propagateEncoding
(
stringEncode\Encode
$encode
) :
void
Sets the encoding class to this node and propagates it
to all its children.
|
public
PHPHtmlParser\Dom\AbstractNode
::
removeAllAttributes
() :
void
A wrapper method that simply calls the removeAllAttributes
method on the tag of this node.
|
public
PHPHtmlParser\Dom\AbstractNode
::
removeAttribute
(
string
$key
) :
void
A wrapper method that simply calls the removeAttribute method
on the tag of this node.
|
public
removeChild
(
int
$id
) :
PHPHtmlParser\Dom\InnerNode
|
public
replaceChild
(
int
$childId
,
PHPHtmlParser\Dom\AbstractNode
$newChild
) :
void
Removes the child with id $childId and replace it with the new child
$newChild.
|
public
static
PHPHtmlParser\Dom\AbstractNode
::
resetCount
()
|
public
PHPHtmlParser\Dom\AbstractNode
::
setAttribute
(
string
$key
,
$value
) :
PHPHtmlParser\Dom\AbstractNode
A wrapper method that simply calls the setAttribute method
on the tag of this node.
|
public
PHPHtmlParser\Dom\AbstractNode
::
setHtmlSpecialCharsDecode
(
$htmlSpecialCharsDecode
=
false
) :
void
|
public
setParent
(
PHPHtmlParser\Dom\InnerNode
$parent
) :
PHPHtmlParser\Dom\AbstractNode
|
public
abstract
PHPHtmlParser\Dom\AbstractNode
::
text
() :
string
Gets the text of this node (if there is any text).
|