PHP Class PHPHtmlParser\Selector

Afficher le fichier Open project: paquettg/php-html-parser Class Usage Examples

Protected Properties

Свойство Type Description
$pattern string Pattern of CSS selectors, modified from 'mootools'
$selectors

Méthodes publiques

Méthode Description
__construct ( string $selector ) Constructs with the selector string
find ( AbstractNode $node ) : Collection Attempts to find the selectors starting from the given node object.
getSelectors ( ) : array Returns the selectors that where found in __construct

Méthodes protégées

Méthode Description
alterNext ( array $rule ) : array Attempts to figure out what the alteration will be for the next element.
flattenOptions ( array $optionsArray ) : array Flattens the option array.
match ( string $operator, string $pattern, string $value ) : boolean Attempts to match the given arguments with the given operator.
parseSelectorString ( string $selector ) Parses the selector string
seek ( array $nodes, array $rule, array $options ) : array Attempts to find all children that match the rule given.

Method Details

__construct() public méthode

Constructs with the selector string
public __construct ( string $selector )
$selector string

alterNext() protected méthode

Attempts to figure out what the alteration will be for the next element.
protected alterNext ( array $rule ) : array
$rule array
Résultat array

find() public méthode

Attempts to find the selectors starting from the given node object.
public find ( AbstractNode $node ) : Collection
$node PHPHtmlParser\Dom\AbstractNode
Résultat PHPHtmlParser\Dom\Collection

flattenOptions() protected méthode

Flattens the option array.
protected flattenOptions ( array $optionsArray ) : array
$optionsArray array
Résultat array

getSelectors() public méthode

Returns the selectors that where found in __construct
public getSelectors ( ) : array
Résultat array

match() protected méthode

Attempts to match the given arguments with the given operator.
protected match ( string $operator, string $pattern, string $value ) : boolean
$operator string
$pattern string
$value string
Résultat boolean

parseSelectorString() protected méthode

Parses the selector string
protected parseSelectorString ( string $selector )
$selector string

seek() protected méthode

Attempts to find all children that match the rule given.
protected seek ( array $nodes, array $rule, array $options ) : array
$nodes array
$rule array
$options array
Résultat array

Property Details

$pattern protected_oe property

Pattern of CSS selectors, modified from 'mootools'
protected string $pattern
Résultat string

$selectors protected_oe property

protected $selectors