PHP Class SimpleHtmlSaxParser, simpletest

Afficher le fichier Open project: simpletest/simpletest Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( SimplePhpPageBuilder $listener ) Sets the listener.
acceptAttributeToken ( string $token, integer $event ) : boolean Part of the tag data.
acceptEndToken ( string $token, integer $event ) : boolean Accepts a token from the end tag mode. The element name is converted to lower case.
acceptEntityToken ( string $token, integer $event ) : boolean A character entity.
acceptStartToken ( string $token, integer $event ) : boolean Accepts a token from the tag mode.
acceptTextToken ( string $token, integer $event ) : boolean Character data between tags regarded as important.
createLexer ( SimpleSaxParser &$parser ) : SimpleLexer Sets up the matching lexer. Starts in 'text' mode.
ignore ( string $token, integer $event ) : boolean Incoming data to be ignored.
parse ( string $raw ) : boolean Runs the content through the lexer which should call back to the acceptors.

Method Details

__construct() public méthode

Sets the listener.
public __construct ( SimplePhpPageBuilder $listener )
$listener SimplePhpPageBuilder SAX event handler.

acceptAttributeToken() public méthode

Part of the tag data.
public acceptAttributeToken ( string $token, integer $event ) : boolean
$token string Incoming characters.
$event integer Lexer event type.
Résultat boolean False if parse error.

acceptEndToken() public méthode

Accepts a token from the end tag mode. The element name is converted to lower case.
public acceptEndToken ( string $token, integer $event ) : boolean
$token string Incoming characters.
$event integer Lexer event type.
Résultat boolean False if parse error.

acceptEntityToken() public méthode

A character entity.
public acceptEntityToken ( string $token, integer $event ) : boolean
$token string Incoming characters.
$event integer Lexer event type.
Résultat boolean False if parse error.

acceptStartToken() public méthode

If the starting element completes then the element is dispatched and the current attributes set back to empty. The element or attribute name is converted to lower case.
public acceptStartToken ( string $token, integer $event ) : boolean
$token string Incoming characters.
$event integer Lexer event type.
Résultat boolean False if parse error.

acceptTextToken() public méthode

Character data between tags regarded as important.
public acceptTextToken ( string $token, integer $event ) : boolean
$token string Incoming characters.
$event integer Lexer event type.
Résultat boolean False if parse error.

createLexer() public static méthode

Sets up the matching lexer. Starts in 'text' mode.
public static createLexer ( SimpleSaxParser &$parser ) : SimpleLexer
$parser SimpleSaxParser Event generator, usually $self.
Résultat SimpleLexer Lexer suitable for this parser.

ignore() public méthode

Incoming data to be ignored.
public ignore ( string $token, integer $event ) : boolean
$token string Incoming characters.
$event integer Lexer event type.
Résultat boolean False if parse error.

parse() public méthode

Runs the content through the lexer which should call back to the acceptors.
public parse ( string $raw ) : boolean
$raw string Page text to parse.
Résultat boolean False if parse error.