PHP 클래스 SimpleHtmlSaxParser, simpletest

파일 보기 프로젝트 열기: simpletest/simpletest 1 사용 예제들

공개 메소드들

메소드 설명
__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.

메소드 상세

__construct() 공개 메소드

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

acceptAttributeToken() 공개 메소드

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

acceptEndToken() 공개 메소드

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.
리턴 boolean False if parse error.

acceptEntityToken() 공개 메소드

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

acceptStartToken() 공개 메소드

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.
리턴 boolean False if parse error.

acceptTextToken() 공개 메소드

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

createLexer() 공개 정적인 메소드

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

ignore() 공개 메소드

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

parse() 공개 메소드

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