Class SimplePhpPageBuilder

Description

SAX event handler. Maintains a list of open tags and dispatches them as they close.

Located in /php_parser.php (line 691)


	
			
Method Summary
 void acceptFormEnd ()
 void acceptFramesetStart (SimpleFramesetTag $tag)
 void acceptLabelEnd ()
 void acceptPageEnd ()
 void acceptTag (SimpleTag $tag)
 boolean addContent (string $text)
 void addContentTagToOpenTags ( &$tag, SimpleTag $tag)
 void addContentToAllOpenTags (string $text)
 boolean can ()
 SimplePage createPage ( $response)
 SimpleSaxParser createParser ( &$listener, SimplePhpPageBuilder $listener)
 boolean endElement (string $name)
 void free ()
 boolean hasNamedTagOnOpenTagStack (string $name)
 boolean isFormElement (string $name)
 boolean isLoadingFrames ()
 void openTag (SimpleTag $tag)
 SimplePage parse ($response $response)
 boolean startElement (string $name, hash $attributes)
Methods
acceptFormEnd (line 981)

Closes the most recently opened form.

  • access: protected
void acceptFormEnd ()
acceptFormStart (line 973)

Opens a form. New widgets go here.

  • access: protected
void acceptFormStart (SimpleFormTag $tag)
acceptFrame (line 1016)

Takes a single frame tag and stashes it in the current frame set.

  • access: protected
void acceptFrame (SimpleFrameTag $tag)
acceptFramesetEnd (line 1004)

Closes the most recently opened frameset.

  • access: protected
void acceptFramesetEnd ()
acceptFramesetStart (line 993)

Opens a frameset. A frameset may contain nested frameset tags.

  • access: protected
void acceptFramesetStart (SimpleFramesetTag $tag)
  • SimpleFramesetTag $tag: Tag to accept.
acceptLabelEnd (line 945)

Closes the most recently opened label.

  • access: protected
void acceptLabelEnd ()
acceptLabelStart (line 936)

Opens a label for a described widget.

  • access: protected
void acceptLabelStart (SimpleFormTag $tag)
acceptPageEnd (line 1039)

Marker for end of complete page. Any work in progress can now be closed.

  • access: protected
void acceptPageEnd ()
acceptTag (line 916)

Adds a tag to the page.

  • access: protected
void acceptTag (SimpleTag $tag)
addContent (line 856)

Unparsed, but relevant data. The data is added to every open tag.

  • return: False on parse error.
  • access: public
boolean addContent (string $text)
  • string $text: May include unparsed tags.
addContentTagToOpenTags (line 886)

Parsed data in tag form. The parsed tag is added to every open tag. Used for adding options to select fields only.

  • access: protected
void addContentTagToOpenTags ( &$tag, SimpleTag $tag)
addContentToAllOpenTags (line 871)

Any content fills all currently open tags unless it is part of an option tag.

  • access: protected
void addContentToAllOpenTags (string $text)
  • string $text: May include unparsed tags.
can (line 723)

This builder is always available.

  • return: Always true.
boolean can ()
createPage (line 750)

Creates an empty page.

  • return: New unparsed page.
  • access: protected
SimplePage createPage ( $response)
  • $response
createParser (line 761)

Creates the parser used with the builder.

  • return: Parser to generate events for the builder.
  • access: protected
SimpleSaxParser createParser ( &$listener, SimplePhpPageBuilder $listener)
endElement (line 813)

End of element event.

  • return: False on parse error.
  • access: public
boolean endElement (string $name)
  • string $name: Element name.
free (line 707)

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

  • access: public
void free ()
hasNamedTagOnOpenTagStack (line 845)

Test to see if there are any open tags awaiting closure that match the tag name.

  • return: True if any are still open.
  • access: protected
boolean hasNamedTagOnOpenTagStack (string $name)
  • string $name: Element name.
isFormElement (line 964)

Tests to see if a tag is a possible form element.

  • return: True if form element.
  • access: protected
boolean isFormElement (string $name)
  • string $name: HTML element name.
isLoadingFrames (line 1030)

Test to see if in the middle of reading a frameset.

  • return: True if inframeset.
  • access: protected
boolean isLoadingFrames ()
openTag (line 903)

Opens a tag for receiving content. Multiple tags will be receiving input at the same time.

  • access: protected
void openTag (SimpleTag $tag)
parse (line 734)

Reads the raw content and send events into the page to be built.

  • return: Newly parsed page.
  • access: public
SimplePage parse ($response $response)
  • $response $response: SimpleHttpResponse Fetched response.
startElement (line 773)

Start of element event. Opens a new tag.

  • return: False on parse error.
  • access: public
boolean startElement (string $name, hash $attributes)
  • string $name: Element name.
  • hash $attributes: Attributes without content are marked as true.

Documentation generated on Sun, 31 Oct 2010 16:32:07 -0500 by phpDocumentor 1.4.3