Copied!

Class Selector

  • package PHPHtmlParser
Cloneable Instantiable
Methods
public __construct ( string $selector , PHPHtmlParser\Selector\ParserInterface $parser )
 

Constructs with the selector string

public checkComparison ( array $rule , PHPHtmlParser\Dom\AbstractNode $node ) : bool
 

Checks comparison condition from rules against node.

  • return bool
public find ( PHPHtmlParser\Dom\AbstractNode $node ) : PHPHtmlParser\Dom\Collection
 

Attempts to find the selectors starting from the given
node object.

  • return Collection
  • throws ChildNotFoundException
public getSelectors ()
 

Returns the selectors that where found in __construct

  • return array
public setDepthFirstFind ( bool $status ) : void
 
  • return void
Properties
protected $selectors
 
  • var array
Methods
protected alterNext ( array $rule ) : array
 

Attempts to figure out what the alteration will be for
the next element.

  • return array
protected checkKey ( array $rule , PHPHtmlParser\Dom\AbstractNode $node ) : bool
 

Checks key condition from rules against node.

  • return bool
protected checkTag ( array $rule , PHPHtmlParser\Dom\AbstractNode $node ) : bool
 

Checks tag condition from rules against node.

  • return bool
protected flattenOptions ( array $optionsArray )
 

Flattens the option array.

  • return array
protected getNextChild ( PHPHtmlParser\Dom\AbstractNode $node , PHPHtmlParser\Dom\AbstractNode $currentChild )
 

Returns the next child or null if no more children.

  • return AbstractNode | null
protected match ( string $operator , string $pattern , string $value ) : bool
 

Attempts to match the given arguments with the given operator.

  • return bool
protected seek ( array $nodes , array $rule , array $options ) : array
 

Attempts to find all children that match the rule
given.

  • return array
  • throws ChildNotFoundException
Properties
private $depthFirst
 
  • var bool
Methods
private checkNodeValue ( ? string $nodeValue , array $rule , PHPHtmlParser\Dom\AbstractNode $node , ? int $index = NULL ) : bool
 
  • return bool
© 2020 Bruce Wells
Search Namespaces \ Classes
Configuration Numbers (0-9.) only