PHP 클래스 SimplePhpPageBuilder, simpletest

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

공개 메소드들

메소드 설명
addContent ( string $text ) : boolean Unparsed, but relevant data. The data is added to every open tag.
can ( ) : boolean This builder is always available.
endElement ( string $name ) : boolean End of element event.
free ( ) Frees up any references so as to allow the PHP garbage collection from unset() to work.
parse ( $response ) : SimplePage Reads the raw content and send events into the page to be built.
startElement ( string $name, hash $attributes ) : boolean Start of element event. Opens a new tag.

보호된 메소드들

메소드 설명
acceptFormEnd ( ) Closes the most recently opened form.
acceptFormStart ( SimpleFormTag $tag ) Opens a form. New widgets go here.
acceptFrame ( SimpleFrameTag $tag ) Takes a single frame tag and stashes it in the current frame set.
acceptFramesetEnd ( ) Closes the most recently opened frameset.
acceptFramesetStart ( SimpleFramesetTag $tag ) Opens a frameset. A frameset may contain nested frameset tags.
acceptLabelEnd ( ) Closes the most recently opened label.
acceptLabelStart ( SimpleFormTag $tag ) Opens a label for a described widget.
acceptPageEnd ( ) Marker for end of complete page. Any work in progress can now be closed.
acceptTag ( SimpleTag $tag ) Adds a tag to the page.
addContentTagToOpenTags ( SimpleTag &$tag ) Parsed data in tag form.
addContentToAllOpenTags ( string $text ) Any content fills all currently open tags unless it is part of an option tag.
createPage ( $response ) : SimplePage Creates an empty page.
createParser ( SimplePhpPageBuilder &$listener ) : SimpleSaxParser Creates the parser used with the builder.
hasNamedTagOnOpenTagStack ( string $name ) : boolean Test to see if there are any open tags awaiting closure that match the tag name.
isFormElement ( string $name ) : boolean Tests to see if a tag is a possible form element.
isLoadingFrames ( ) : boolean Test to see if in the middle of reading a frameset.
openTag ( SimpleTag $tag ) Opens a tag for receiving content.

메소드 상세

acceptFormEnd() 보호된 메소드

Closes the most recently opened form.
protected acceptFormEnd ( )

acceptFormStart() 보호된 메소드

Opens a form. New widgets go here.
protected acceptFormStart ( SimpleFormTag $tag )
$tag SimpleFormTag Tag to accept.

acceptFrame() 보호된 메소드

Takes a single frame tag and stashes it in the current frame set.
protected acceptFrame ( SimpleFrameTag $tag )
$tag SimpleFrameTag Tag to accept.

acceptFramesetEnd() 보호된 메소드

Closes the most recently opened frameset.
protected acceptFramesetEnd ( )

acceptFramesetStart() 보호된 메소드

Opens a frameset. A frameset may contain nested frameset tags.
protected acceptFramesetStart ( SimpleFramesetTag $tag )
$tag SimpleFramesetTag Tag to accept.

acceptLabelEnd() 보호된 메소드

Closes the most recently opened label.
protected acceptLabelEnd ( )

acceptLabelStart() 보호된 메소드

Opens a label for a described widget.
protected acceptLabelStart ( SimpleFormTag $tag )
$tag SimpleFormTag Tag to accept.

acceptPageEnd() 보호된 메소드

Marker for end of complete page. Any work in progress can now be closed.
protected acceptPageEnd ( )

acceptTag() 보호된 메소드

Adds a tag to the page.
protected acceptTag ( SimpleTag $tag )
$tag SimpleTag Tag to accept.

addContent() 공개 메소드

Unparsed, but relevant data. The data is added to every open tag.
public addContent ( string $text ) : boolean
$text string May include unparsed tags.
리턴 boolean False on parse error.

addContentTagToOpenTags() 보호된 메소드

The parsed tag is added to every open tag. Used for adding options to select fields only.
protected addContentTagToOpenTags ( SimpleTag &$tag )
$tag SimpleTag Option tags only.

addContentToAllOpenTags() 보호된 메소드

Any content fills all currently open tags unless it is part of an option tag.
protected addContentToAllOpenTags ( string $text )
$text string May include unparsed tags.

can() 공개 메소드

This builder is always available.
public can ( ) : boolean
리턴 boolean Always true.

createPage() 보호된 메소드

Creates an empty page.
protected createPage ( $response ) : SimplePage
리턴 SimplePage New unparsed page.

createParser() 보호된 메소드

Creates the parser used with the builder.
protected createParser ( SimplePhpPageBuilder &$listener ) : SimpleSaxParser
$listener SimplePhpPageBuilder Target of parser.
리턴 SimpleSaxParser Parser to generate events for the builder.

endElement() 공개 메소드

End of element event.
public endElement ( string $name ) : boolean
$name string Element name.
리턴 boolean False on parse error.

free() 공개 메소드

Frees up any references so as to allow the PHP garbage collection from unset() to work.
public free ( )

hasNamedTagOnOpenTagStack() 보호된 메소드

Test to see if there are any open tags awaiting closure that match the tag name.
protected hasNamedTagOnOpenTagStack ( string $name ) : boolean
$name string Element name.
리턴 boolean True if any are still open.

isFormElement() 보호된 메소드

Tests to see if a tag is a possible form element.
protected isFormElement ( string $name ) : boolean
$name string HTML element name.
리턴 boolean True if form element.

isLoadingFrames() 보호된 메소드

Test to see if in the middle of reading a frameset.
protected isLoadingFrames ( ) : boolean
리턴 boolean True if inframeset.

openTag() 보호된 메소드

Multiple tags will be receiving input at the same time.
protected openTag ( SimpleTag $tag )
$tag SimpleTag New content tag.

parse() 공개 메소드

Reads the raw content and send events into the page to be built.
public parse ( $response ) : SimplePage
$response SimpleHttpResponse Fetched response.
리턴 SimplePage Newly parsed page.

startElement() 공개 메소드

Start of element event. Opens a new tag.
public startElement ( string $name, hash $attributes ) : boolean
$name string Element name.
$attributes hash Attributes without content are marked as true.
리턴 boolean False on parse error.