Comments: on this page. Click to read or post your own.

Class SimplePageBuilder

Description

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

Located in /sapphire/dev/simpletest/page.php (line 120)

SimpleSaxListener
   |
   --SimplePageBuilder
Variable Summary
mixed $_page
mixed $_tags
Method Summary
SimplePageBuilder SimplePageBuilder ()
boolean addContent (string $text)
boolean endElement (string $name)
void free ()
SimplePage &parse ($response $response)
boolean startElement (string $name, hash $attributes)
SimplePage &_createPage ( $response)
SimpleSaxParser &_createParser ($listener &$listener)
Variables
mixed $_page (line 122)
mixed $_private_content_tag (line 123)
mixed $_tags (line 121)
Methods
Constructor SimplePageBuilder (line 129)

Sets the builder up empty.

  • access: public
SimplePageBuilder SimplePageBuilder ()
addContent (line 273)

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.

Redefinition of:
SimpleSaxListener::addContent()
Unparsed, but relevant data.
endElement (line 230)

End of element event.

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

Redefinition of:
SimpleSaxListener::endElement()
End of element event.
free (line 138)

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

  • access: public
void free ()
parse (line 151)

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 190)

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.

Redefinition of:
SimpleSaxListener::startElement()
Start of element event.
_createPage (line 165)

Creates an empty page.

  • return: New unparsed page.
  • access: protected
SimplePage &_createPage ( $response)
  • $response
_createParser (line 177)

Creates the parser used with the builder.

  • return: Parser to generate events for the builder.
  • access: protected
SimpleSaxParser &_createParser ($listener &$listener)
  • $listener &$listener: SimpleSaxListener Target of parser.

Inherited Methods

Inherited From SimpleSaxListener

SimpleSaxListener::SimpleSaxListener()
SimpleSaxListener::addContent()
SimpleSaxListener::endElement()
SimpleSaxListener::startElement()
blog comments powered by Disqus

Documentation generated on Sun, 19 Oct 2008 06:43:58 +1300 by phpDocumentor 1.3.2