Moodle  2.2.1
http://www.collinsharper.com
SimplePageBuilder Class Reference
Inheritance diagram for SimplePageBuilder:
Collaboration diagram for SimplePageBuilder:

Public Member Functions

 SimplePageBuilder ()
 free ()
parse ($response)
_createPage ($response)
_createParser (&$listener)
 startElement ($name, $attributes)
 endElement ($name)
 _hasNamedTagOnOpenTagStack ($name)
 addContent ($text)
 _addContentToAllOpenTags ($text)
 _addContentTagToOpenTags (&$tag)
 _openTag (&$tag)

Data Fields

 $_tags
 $_page
 $_private_content_tag

Detailed Description

Definition at line 120 of file page.php.


Member Function Documentation

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

Parameters:
SimpleTag$tagOption tags only. private

Definition at line 303 of file page.php.

Here is the caller graph for this function:

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

Parameters:
string$textMay include unparsed tags. private

Definition at line 288 of file page.php.

Here is the caller graph for this function:

& _createPage ( response)

Creates an empty page.

Returns:
SimplePage New unparsed page. protected

Definition at line 165 of file page.php.

Here is the caller graph for this function:

& _createParser ( &$  listener)

Creates the parser used with the builder.

Parameters:
$listenerSimpleSaxListener Target of parser.
Returns:
SimpleSaxParser Parser to generate events for the builder. protected

Definition at line 177 of file page.php.

Here is the caller graph for this function:

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

Parameters:
string$nameElement name.
Returns:
boolean True if any are still open. private

Definition at line 262 of file page.php.

Here is the caller graph for this function:

_openTag ( &$  tag)

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

Parameters:
SimpleTag$tagNew content tag. private

Definition at line 320 of file page.php.

Here is the caller graph for this function:

addContent ( text)

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

Parameters:
string$textMay include unparsed tags.
Returns:
boolean False on parse error. public

Reimplemented from SimpleSaxListener.

Definition at line 273 of file page.php.

Here is the call graph for this function:

endElement ( name)

End of element event.

Parameters:
string$nameElement name.
Returns:
boolean False on parse error. public

Reimplemented from SimpleSaxListener.

Definition at line 230 of file page.php.

Here is the call graph for this function:

free ( )

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

Definition at line 138 of file page.php.

& parse ( response)

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

Parameters:
$responseSimpleHttpResponse Fetched response.
Returns:
SimplePage Newly parsed page. public

Definition at line 151 of file page.php.

Here is the call graph for this function:

Sets the builder up empty. public

Definition at line 129 of file page.php.

Here is the call graph for this function:

startElement ( name,
attributes 
)

Start of element event. Opens a new tag.

Parameters:
string$nameElement name.
hash$attributesAttributes without content are marked as true.
Returns:
boolean False on parse error. public

Reimplemented from SimpleSaxListener.

Definition at line 190 of file page.php.

Here is the call graph for this function:


Field Documentation

$_page

Definition at line 122 of file page.php.

$_private_content_tag

Definition at line 123 of file page.php.

$_tags

Definition at line 121 of file page.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations