Свойство | Type | Description | |
---|---|---|---|
$dom | |||
$initialized | |||
$matches | |||
$psHandler | |||
$scopeNode | |||
$selector |
Méthode | Description | |
---|---|---|
__construct ( SPLObjectStorage $splos, $initialized = false, $scopeNode = null ) | Build a new DOMTraverser. | |
attachNodeList ( DOMNodeList $nodeList, SplObjectStorage $splos ) | Attach all nodes in a node list to the given \SplObjectStorage. | |
combine ( DOMNode $node, array $selectors, integer $index ) | Combine the next selector with the given match using the next combinator. | |
combineAdjacent ( DOMNode $node, array $selectors, integer $index ) : boolean | Process an Adjacent Sibling. | |
combineAnyDescendant ( DOMNode $node, array $selectors, integer $index ) : boolean | Handle Any Descendant combinations. | |
combineDirectDescendant ( DOMNode $node, array $selectors, integer $index ) : boolean | Handle a Direct Descendant combination. | |
combineSibling ( DOMNode $node, array $selectors, integer $index ) : boolean | Check all siblings. | |
debug ( $msg ) | ||
find ( string $selector ) | Given a selector, find the matches in the given DOM. | |
getDocument ( ) | ||
matches ( ) | ||
matchesSelector ( $node, $selector ) | Check whether the given node matches the given selector. | |
matchesSimpleSelector ( $node, $selectors, $index ) | Performs a match check on a SimpleSelector. |
Méthode | Description | |
---|---|---|
ancestors ( $node ) | Get a list of ancestors to the present node. | |
getMatches ( ) | Get the internal match set. | |
initialMatch ( $selector, $matches ) | Get the intial match set. | |
initialMatchOnClasses ( $selector, $matches ) | Shortcut for setting the intial match. | |
initialMatchOnElement ( $selector, $matches ) | Shortcut for setting the initial match. | |
initialMatchOnElementNS ( $selector, $matches ) | Get elements and filter by namespace. | |
initialMatchOnID ( $selector, $matches ) | Shortcut for finding initial match by ID. | |
matchAttributes ( $node, $attributes ) | Check to see if DOMNode has all of the given attributes. | |
matchClasses ( $node, $classes ) | Check that the given DOMNode has all of the given classes. | |
matchElement ( $node, $element, $ns = null ) | Checks to see if the DOMNode matches the given element selector. | |
matchId ( $node, $id ) | Check that the given DOMNode has the given ID. | |
matchPseudoClasses ( $node, $pseudoClasses ) | ||
matchPseudoElements ( $node, $pseudoElements ) | Test whether the given node matches the pseudoElements. | |
newMatches ( ) | ||
setMatches ( $matches ) | Set the internal match set. |
Méthode | Description | |
---|---|---|
initialXpathQuery ( $xpath, $node, $query ) | Internal xpath query. |
public __construct ( SPLObjectStorage $splos, $initialized = false, $scopeNode = null ) | ||
$splos | SPLObjectStorage |
protected ancestors ( $node ) |
public attachNodeList ( DOMNodeList $nodeList, SplObjectStorage $splos ) | ||
$nodeList | DOMNodeList | |
$splos | SplObjectStorage |
public combineAdjacent ( DOMNode $node, array $selectors, integer $index ) : boolean | ||
$node | DOMNode | A DOM Node. |
$selectors | array | The selectors array. |
$index | integer | The current index to the operative simple selector in the selectors array. |
Résultat | boolean | TRUE if the combination matches, FALSE otherwise. |
public combineAnyDescendant ( DOMNode $node, array $selectors, integer $index ) : boolean | ||
$node | DOMNode | A DOM Node. |
$selectors | array | The selectors array. |
$index | integer | The current index to the operative simple selector in the selectors array. |
Résultat | boolean | TRUE if the combination matches, FALSE otherwise. |
public combineDirectDescendant ( DOMNode $node, array $selectors, integer $index ) : boolean | ||
$node | DOMNode | A DOM Node. |
$selectors | array | The selectors array. |
$index | integer | The current index to the operative simple selector in the selectors array. |
Résultat | boolean | TRUE if the combination matches, FALSE otherwise. |
public combineSibling ( DOMNode $node, array $selectors, integer $index ) : boolean | ||
$node | DOMNode | A DOM Node. |
$selectors | array | The selectors array. |
$index | integer | The current index to the operative simple selector in the selectors array. |
Résultat | boolean | TRUE if the combination matches, FALSE otherwise. |
protected initialMatch ( $selector, $matches ) |
protected initialMatchOnClasses ( $selector, $matches ) |
protected initialMatchOnElement ( $selector, $matches ) |
protected initialMatchOnElementNS ( $selector, $matches ) |
protected initialMatchOnID ( $selector, $matches ) |
protected matchAttributes ( $node, $attributes ) |
protected matchClasses ( $node, $classes ) |
protected matchElement ( $node, $element, $ns = null ) |
protected matchId ( $node, $id ) |
protected matchPseudoElements ( $node, $pseudoElements ) |
public matchesSelector ( $node, $selector ) |
public matchesSimpleSelector ( $node, $selectors, $index ) |