Class CssScanner

(line 768)

Description


Located in File: /src/QueryPath/CssParser.php

Scanner for CSS selector parsing.

This provides a simple scanner for traversing an input stream.



Class Variables

Summary:
mixed $is
mixed $it
mixed $recurse
mixed $token
mixed $value

$is = NULL (line 769)

Data type : mixed

$it = 0 (line 774)

Data type : mixed

$recurse = FALSE (line 773)

Data type : mixed

$token = NULL (line 771)

Data type : mixed

  • access: - public

$value = NULL (line 770)

Data type : mixed

  • access: - public

Class Constants

Summary:

Method Detail

Summary:
CssScanner __construct (CssInputStream $in)
void getNameString ()
void getQuotedString ()
int nextToken ()
char peek ()

Constructor __construct (line 782)

CssScanner __construct( CssInputStream $in)

Given a new input stream, tokenize the CSS selector string.

Parameters

Info

Method getNameString (line 929)

void getNameString( )

Get a name string from the input stream.

A name string must be composed of only characters defined in CssToken:char: -_a-zA-Z0-9

Info

  • access - public

Method getQuotedString (line 955)

void getQuotedString( )

This gets a string with any legal 'string' characters.

See CSS Selectors specification, section 11, for the definition of string.

This will check for string1, string2, and the case where a string is unquoted (Oddly absent from the "official" grammar, though such strings are present as examples in the spec.)

Note: Though the grammar supplied by CSS 3 Selectors section 11 does not address the contents of a pseudo-class value, the spec itself indicates that a pseudo-class value is a "value between parenthesis" [6.6]. The examples given use URLs among other things, making them closer to the definition of 'string' than to 'name'. So we handle them here as strings.

Info

  • access - public

Method nextToken (line 807)

int nextToken( )

Get the next token in the input stream.

This sets the current token to the value of the next token in the stream.

Info

  • return - Returns an int value corresponding to one of the CssToken constants, or FALSE if the end of the string is reached. (Remember to use strong equality checking on FALSE, since 0 is a valid token id.)
  • access - public

Method peek (line 792)

char peek( )

See the next char without removing it from the stack.

Info

  • return - Returns the next character on the stack.
  • access - public

Inherited Variables

Inherited Class Variable Summary

Inherited Methods

Inherited Method Summary


Documentation generated on Sun, 25 Jul 2010 16:09:04 -0500 by phpDocumentor 1.4.3