[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/_test/vendor/scotteh/php-dom-wrapper/src/Traits/ -> TraversalTrait.php (summary)

Traversal Trait

License: http://opensource.org/licenses/BSD-3-Clause BSD 3 Clause
File Size: 463 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 27 functions

  newNodeList()
  find()
  findXPath()
  getNodesMatchingInput()
  is()
  not()
  filter()
  has()
  preceding()
  precedingAll()
  precedingUntil()
  following()
  followingAll()
  followingUntil()
  siblings()
  children()
  parent()
  eq()
  parents()
  parentsUntil()
  intersect()
  closest()
  contents()
  add()
  _buildNodeListUntil()
  _uniqueNodes()
  _walkPathUntil()

Functions
Functions that are not part of a class:

newNodeList(iterable $nodes = null)   X-Ref

param: iterable $nodes
return: NodeList

find(string $selector, string $prefix = 'descendant::')   X-Ref

param: string $selector
param: string $prefix
return: NodeList

findXPath(string $xpath)   X-Ref

param: string $xpath
return: NodeList

getNodesMatchingInput($input, bool $matchType = true)   X-Ref

param: string|NodeList|\DOMNode|callable $input
param: bool $matchType
return: NodeList

is($input)   X-Ref

param: string|NodeList|\DOMNode|callable $input
return: bool

not($input)   X-Ref

param: string|NodeList|\DOMNode|callable $input
return: NodeList

filter($input)   X-Ref

param: string|NodeList|\DOMNode|callable $input
return: NodeList

has($input)   X-Ref

param: string|NodeList|\DOMNode|callable $input
return: NodeList

preceding($selector = null)   X-Ref

param: string|NodeList|\DOMNode|callable $selector
return: \DOMNode|null

precedingAll($selector = null)   X-Ref

param: string|NodeList|\DOMNode|callable $selector
return: NodeList

precedingUntil($input = null, $selector = null)   X-Ref

param: string|NodeList|\DOMNode|callable $input
param: string|NodeList|\DOMNode|callable $selector
return: NodeList

following($selector = null)   X-Ref

param: string|NodeList|\DOMNode|callable $selector
return: \DOMNode|null

followingAll($selector = null)   X-Ref

param: string|NodeList|\DOMNode|callable $selector
return: NodeList

followingUntil($input = null, $selector = null)   X-Ref

param: string|NodeList|\DOMNode|callable $input
param: string|NodeList|\DOMNode|callable $selector
return: NodeList

siblings($selector = null)   X-Ref

param: string|NodeList|\DOMNode|callable $selector
return: NodeList

children()   X-Ref
NodeList is only array like. Removing items using foreach() has undesired results.

return: NodeList

parent($selector = null)   X-Ref

param: string|NodeList|\DOMNode|callable $selector
return: Element|NodeList|null

eq(int $index)   X-Ref

param: int $index
return: \DOMNode|null

parents(string $selector = null)   X-Ref

param: string $selector
return: NodeList

parentsUntil($input = null, $selector = null)   X-Ref

param: string|NodeList|\DOMNode|callable $input
param: string|NodeList|\DOMNode|callable $selector
return: NodeList

intersect()   X-Ref

return: \DOMNode

closest($input)   X-Ref

param: string|NodeList|\DOMNode|callable $input
return: Element|NodeList|null

contents()   X-Ref
NodeList is only array like. Removing items using foreach() has undesired results.

return: NodeList

add($input)   X-Ref

param: string|NodeList|\DOMNode $input
return: NodeList

_buildNodeListUntil(\DOMNode $baseNode, string $property, $input = null, $selector = null, int $matchType = null)   X-Ref

param: \DOMNode $baseNode
param: string $property
param: string|NodeList|\DOMNode|callable $input
param: string|NodeList|\DOMNode|callable $selector
param: int $matchType
return: NodeList

_uniqueNodes(iterable $nodeLists)   X-Ref

param: iterable $nodeLists
return: NodeList

_walkPathUntil(string $property, $input = null, $selector = null, int $matchType = null)   X-Ref

param: string $property
param: string|NodeList|\DOMNode|callable $input
param: string|NodeList|\DOMNode|callable $selector
param: int $matchType
return: NodeList