PHP Class SimpleHtmlLexer, simpletest

Inheritance: extends SimpleLexer
Exibir arquivo Open project: simpletest/simpletest Class Usage Examples

Public Methods

Method Description
__construct ( SimpleSaxParser $parser ) Sets up the lexer with case insensitive matching and adds the HTML handlers.

Protected Methods

Method Description
addAttributeTokens ( ) Matches attributes that are either single quoted, double quoted or unquoted.
addInTagTokens ( ) Pattern matches to parse the inside of a tag including the attributes and their quoting.
addSkipping ( ) The lexer has to skip certain sections such as server code, client code and styles.
addTag ( string $tag ) Pattern matches to start and end a tag.
getParsedTags ( ) : array List of parsed tags. Others are ignored.

Method Details

__construct() public method

Sets up the lexer with case insensitive matching and adds the HTML handlers.
public __construct ( SimpleSaxParser $parser )
$parser SimpleSaxParser Handling strategy by reference.

addAttributeTokens() protected method

Matches attributes that are either single quoted, double quoted or unquoted.
protected addAttributeTokens ( )

addInTagTokens() protected method

Pattern matches to parse the inside of a tag including the attributes and their quoting.
protected addInTagTokens ( )

addSkipping() protected method

The lexer has to skip certain sections such as server code, client code and styles.
protected addSkipping ( )

addTag() protected method

Pattern matches to start and end a tag.
protected addTag ( string $tag )
$tag string Name of tag to scan for.

getParsedTags() protected method

List of parsed tags. Others are ignored.
protected getParsedTags ( ) : array
return array List of searched for tags.