PHP 클래스 DiDom\Query

파일 보기 프로젝트 열기: imangazaliev/didom 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$compiled array

공개 메소드들

메소드 설명
buildXpath ( array $segments, string $prefix = '//' ) : string
compile ( string $expression, string $type = self::TYPE_CSS ) : string Converts a CSS selector into an XPath expression.
cssToXpath ( string $selector, string $prefix = '//' ) : string Converts a CSS selector into an XPath expression.
getCompiled ( ) : array
getSegments ( string $selector ) : array Splits the CSS selector into parts (tag name, ID, classes, attributes, pseudo-class).
setCompiled ( array $compiled )

보호된 메소드들

메소드 설명
convertAttribute ( string $name, string $value ) : string
convertContains ( string $string, boolean $caseSensetive = false ) : string
convertNthExpression ( string $expression ) : string Converts nth-expression into an XPath expression.
convertProperty ( string $name, array $args = [] ) : string
convertPseudo ( string $pseudo, string $parameters = [], string &$tagName ) : string Converts a CSS pseudo-class into an XPath expression.
parseProperty ( string $property ) : array

메소드 상세

buildXpath() 공개 정적인 메소드

public static buildXpath ( array $segments, string $prefix = '//' ) : string
$segments array
$prefix string Specifies the nesting of nodes
리턴 string XPath expression

compile() 공개 정적인 메소드

Converts a CSS selector into an XPath expression.
public static compile ( string $expression, string $type = self::TYPE_CSS ) : string
$expression string XPath expression or CSS selector
$type string The type of the expression
리턴 string XPath expression

convertAttribute() 보호된 정적인 메소드

protected static convertAttribute ( string $name, string $value ) : string
$name string The attribute name
$value string The attribute value
리턴 string

convertContains() 보호된 정적인 메소드

protected static convertContains ( string $string, boolean $caseSensetive = false ) : string
$string string
$caseSensetive boolean
리턴 string

convertNthExpression() 보호된 정적인 메소드

Converts nth-expression into an XPath expression.
protected static convertNthExpression ( string $expression ) : string
$expression string nth-expression
리턴 string

convertProperty() 보호된 정적인 메소드

protected static convertProperty ( string $name, array $args = [] ) : string
$name string
$args array
리턴 string

convertPseudo() 보호된 정적인 메소드

Converts a CSS pseudo-class into an XPath expression.
protected static convertPseudo ( string $pseudo, string $parameters = [], string &$tagName ) : string
$pseudo string Pseudo-class
$parameters string
$tagName string
리턴 string

cssToXpath() 공개 정적인 메소드

Converts a CSS selector into an XPath expression.
public static cssToXpath ( string $selector, string $prefix = '//' ) : string
$selector string A CSS selector
$prefix string Specifies the nesting of nodes
리턴 string XPath expression

getCompiled() 공개 정적인 메소드

public static getCompiled ( ) : array
리턴 array

getSegments() 공개 정적인 메소드

Splits the CSS selector into parts (tag name, ID, classes, attributes, pseudo-class).
public static getSegments ( string $selector ) : array
$selector string CSS selector
리턴 array

parseProperty() 보호된 정적인 메소드

protected static parseProperty ( string $property ) : array
$property string
리턴 array

setCompiled() 공개 정적인 메소드

public static setCompiled ( array $compiled )
$compiled array

프로퍼티 상세

$compiled 보호되어 있는 정적으로 프로퍼티

protected static array $compiled
리턴 array