PHP 클래스 pQuery\HtmlSelector

파일 보기 프로젝트 열기: tburry/pquery

공개 프로퍼티들

프로퍼티 타입 설명
$custom_filter_map array Extra function map for custom filters
$parser CSSQueryTokenizer Parser object
$query string Last performed query, result in {@link $result}
$result array Array of matching nodes
$root DomNode Target of queries
$search_recursive boolean Search recursively
$search_root boolean Include root in search, if false the only child nodes are evaluated

공개 메소드들

메소드 설명
__construct ( DomNode $root, string $query = '*', boolean $search_root = false, boolean $search_recursive = true, CSSQueryTokenizer $parser = null ) Class constructor
__invoke ( $query = '*' ) : array Class magic invoke method, performs {@link select()}
__toString ( ) : string toString method, returns {@link $query}
select ( string $query = '*' ) : array Perform query

보호된 메소드들

메소드 설명
error ( string $error ) Trigger error
parse ( ) : boolean Parse full query
parse_adjacent ( ) : boolean Evaluate sibling nodes
parse_callback ( array $conditions, boolean | integer $recursive = true, boolean $check_root = false ) : array Evaluate root node using custom callback
parse_conditions ( ) : array Get query conditions (tag, attribute and filter conditions)
parse_getIdentifier ( boolean $do_error = true ) : string Get identifier (parse identifier or string)
parse_result ( boolean $parent = false, boolean | integer $recursive = true ) : boolean Evaluate {@link $result}
parse_single ( boolean | integer $recursive = true ) : boolean Parse first bit of query, only root node has to be evaluated now

메소드 상세

__construct() 공개 메소드

Class constructor
public __construct ( DomNode $root, string $query = '*', boolean $search_root = false, boolean $search_recursive = true, CSSQueryTokenizer $parser = null )
$root DomNode {@link $root}
$query string
$search_root boolean {@link $search_root}
$search_recursive boolean {@link $search_recursive}
$parser CSSQueryTokenizer If null, then default class will be used

__invoke() 공개 메소드

Class magic invoke method, performs {@link select()}
public __invoke ( $query = '*' ) : array
리턴 array

__toString() 공개 메소드

toString method, returns {@link $query}
public __toString ( ) : string
리턴 string

error() 보호된 메소드

Trigger error
protected error ( string $error )
$error string

parse() 보호된 메소드

Parse full query
protected parse ( ) : boolean
리턴 boolean

parse_adjacent() 보호된 메소드

Evaluate sibling nodes
protected parse_adjacent ( ) : boolean
리턴 boolean

parse_callback() 보호된 메소드

Evaluate root node using custom callback
protected parse_callback ( array $conditions, boolean | integer $recursive = true, boolean $check_root = false ) : array
$conditions array {@link parse_conditions()}
$recursive boolean | integer
$check_root boolean
리턴 array

parse_conditions() 보호된 메소드

Get query conditions (tag, attribute and filter conditions)
또한 보기: DomNode::match()
protected parse_conditions ( ) : array
리턴 array False on failure

parse_getIdentifier() 보호된 메소드

Get identifier (parse identifier or string)
protected parse_getIdentifier ( boolean $do_error = true ) : string
$do_error boolean Error on failure
리턴 string False on failure

parse_result() 보호된 메소드

Evaluate {@link $result}
protected parse_result ( boolean $parent = false, boolean | integer $recursive = true ) : boolean
$parent boolean Evaluate parent nodes
$recursive boolean | integer
리턴 boolean

parse_single() 보호된 메소드

Parse first bit of query, only root node has to be evaluated now
protected parse_single ( boolean | integer $recursive = true ) : boolean
$recursive boolean | integer
리턴 boolean

select() 공개 메소드

Perform query
public select ( string $query = '*' ) : array
$query string
리턴 array False on failure

프로퍼티 상세

$custom_filter_map 공개적으로 프로퍼티

Extra function map for custom filters
또한 보기: DomNode::$filter_map
public array $custom_filter_map
리턴 array

$parser 공개적으로 프로퍼티

Parser object
public CSSQueryTokenizer,pquery $parser
리턴 CSSQueryTokenizer

$query 공개적으로 프로퍼티

Last performed query, result in {@link $result}
public string $query
리턴 string

$result 공개적으로 프로퍼티

Array of matching nodes
public array $result
리턴 array

$root 공개적으로 프로퍼티

Target of queries
public DomNode,pquery $root
리턴 DomNode

$search_recursive 공개적으로 프로퍼티

Search recursively
public bool $search_recursive
리턴 boolean

$search_root 공개적으로 프로퍼티

Include root in search, if false the only child nodes are evaluated
public bool $search_root
리턴 boolean