Class

Symfony\Component\CssSelector\Token

class Token

Token represents a CSS Selector token.

This component is a port of the Python lxml library, which is copyright Infrae and distributed under the BSD license.

Methods

__construct(string $type, mixed $value, integer $position)

Constructor.

string __toString()

Gets a string representation of this token.

Boolean isType(string $type)

Answers whether this token's type equals to $type.

integer getPosition()

Gets the position of this token.

Details

at line 35
public __construct(string $type, mixed $value, integer $position)

Constructor.

Parameters

string $type The type of this token.
mixed $value The value of this token.
integer $position The order of this token.

at line 47
public string __toString()

Gets a string representation of this token.

Return Value

string

at line 59
public Boolean isType(string $type)

Answers whether this token's type equals to $type.

Parameters

string $type The type to test against this token's one.

Return Value

Boolean

at line 69
public integer getPosition()

Gets the position of this token.

Return Value

integer