Class CssParser

(line 228)

Description


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

Parse a CSS selector.

In CSS, a selector is used to identify which element or elements in a DOM are being selected for the application of a particular style. Effectively, selectors function as a query language for a structured document -- almost always HTML or XML.

This class provides an event-based parser for CSS selectors. It can be used, for example, as a basis for writing a DOM query engine based on CSS.



Class Variables

Summary:
mixed $buffer
mixed $DEBUG
mixed $handler
mixed $scanner
mixed $strict

$buffer = '' (line 230)

Data type : mixed

$DEBUG = FALSE (line 234)

Data type : mixed

$handler = NULL (line 231)

Data type : mixed

$scanner = NULL (line 229)

Data type : mixed

$strict = FALSE (line 232)

Data type : mixed

Class Constants

Summary:

Method Detail

Summary:
CssParser __construct ( $string, CssEventHandler $handler)
void parse ()

Constructor __construct (line 241)

CssParser __construct( $string, CssEventHandler $handler)

Construct a new CSS parser object. This will attempt to parse the string as a CSS selector. As it parses, it will send events to the CssEventHandler implementation.

Parameters

Info

  • access - public

Method parse (line 255)

void parse( )

Parse the selector.

This begins an event-based parsing process that will fire events as the selector is handled. A CssEventHandler implementation will be responsible for handling the events.

Info

  • throws - CssParseException
  • 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