# Class Token

This class represents a CSS selector token

Namespace: WPGMZA\Selector
Located at class.selector-to-xpath.php

Methods summary
`public` | # `__construct( string $type, string $string )` Constructor. Constructor. #### Parameters $type Any of the constants defined in this class. $string Either a string matching the values of the constants defined in this class, or where $type is IDENTIFIER, STRING or EXPRESSION, the string representing that element of the selector
`public boolean` | # `isCombinator( )` Retuns true if this token is a CSS combinator (eg > + ~) Retuns true if this token is a CSS combinator (eg > + ~) #### Returns boolean
`public boolean` | # `isAttributeOperator( )` Returns true if this token is a CSS attribute operator (eg ^= *= |=) Returns true if this token is a CSS attribute operator (eg ^= *= |=) #### Returns boolean
`public string` | # `getFriendlyType( )` Returns the "friendly" type name, eg "IDENTIFIER" for -1, "DOUBLE_QUOTE" for ". Returns the "friendly" type name, eg "IDENTIFIER" for -1, "DOUBLE_QUOTE" for ". #### Returns string The constant name based on type value.
`public` | # `__toString( )`

Constants summary
`string` | `OPEN_BRACKET` | # `'['`
`string` | `CLOSE_BRACKET` | # `']'`
`string` | `OPEN_PARENTHES` | # `'('`
`string` | `CLOSE_PARENTHES` | # `')'`
`string` | `CLASS_SHORTHAND` | # `'.'`
`string` | `ID_SHORTHAND` | # `'#'`
`string` | `SINGLE_QUOTE` | # `"'"`
`string` | `ANY_ELEMENT` | # `'*'`
`string` | `DOUBLE_QUOTE` | # `'"'`
`string` | `PSEUDO` | # `':'`
`string` | `UNION_OPERATOR` | # `','`
`string` | `DESCENDANT_COMBINATOR` | # `' '`
`string` | `CHILD_COMBINATOR` | # `'>'`
`string` | `ADJACENT_SIBLING_COMBINATOR` | # `'+'`
`string` | `GENERAL_SIBLING_COMBINATOR` | # `'~'`
`string` | `ATTRIBUTE_EQUAL_TO` | # `'='`
`string` | `ATTRIBUTE_WHITESPACE_LIST_CONTAINS` | # `'~='`
`string` | `ATTRIBUTE_BEGINS_WITH` | # `'^='`
`string` | `ATTRIBUTE_ENDS_WITH` | # `'$='`
`string` | `ATTRIBUTE_CONTAINS_SUBSTRING` | # `'*='`
`string` | `ATTRIBUTE_HYPHEN_LIST_BEGINS_WITH` | # `'|='`
`integer` | `IDENTIFIER` | # `-1`
`integer` | `STRING` | # `-2`
`integer` | `EXPRESSION` | # `-3`

Properties summary
`public` | $type | # `null`
`public` | $string | # ``