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

Public Member Functions

 __construct (array $paths=array())
 add_path ($path)
 process_chunk ($data)
 before_path ($path)
 after_path ($path)

Protected Member Functions

 dispatch_chunk ($data)
 notify_path_start ($path)
 notify_path_end ($path)
 process_pending_startend_notifications ($path, $action)
 postprocess_chunk ($data)
 path_is_selected ($path)
 path_is_selected_parent ($path)
 selected_parent_exists ($path)

Protected Attributes

 $paths
 $parentpaths
 $parentsinfo
 $startendinfo

Detailed Description

Abstract xml parser processor to to simplify and dispatch parsed chunks

This handles the requested paths, performing some conversions from the original "propietary array format" used by the to a simplified structure to be used easily. Found attributes are converted automatically to tags and cdata to simpler values.

Note: final tag attributes are discarded completely!

TODO: Complete phpdocs

Definition at line 40 of file simplified_parser_processor.class.php.


Constructor & Destructor Documentation

__construct ( array paths = array())

Reimplemented in grouped_parser_processor.

Definition at line 46 of file simplified_parser_processor.class.php.

Here is the call graph for this function:


Member Function Documentation

add_path ( path)

Definition at line 58 of file simplified_parser_processor.class.php.

Here is the call graph for this function:

Here is the caller graph for this function:

after_path ( path)

The parser fires this each time one path has been parsed

Parameters:
string$pathxml path which parsing has ended

Reimplemented from progressive_parser_processor.

Reimplemented in grouped_parser_processor.

Definition at line 175 of file simplified_parser_processor.class.php.

Here is the call graph for this function:

before_path ( path)

The parser fires this each time one path is going to be parsed

Parameters:
string$pathxml path which parsing has started

Reimplemented from progressive_parser_processor.

Reimplemented in grouped_parser_processor.

Definition at line 164 of file simplified_parser_processor.class.php.

Here is the call graph for this function:

path_is_selected ( path) [protected]

Definition at line 239 of file simplified_parser_processor.class.php.

Here is the caller graph for this function:

path_is_selected_parent ( path) [protected]

Definition at line 243 of file simplified_parser_processor.class.php.

Here is the caller graph for this function:

postprocess_chunk ( data) [protected]

Reimplemented in grouped_parser_processor, and restore_structure_parser_processor.

Definition at line 235 of file simplified_parser_processor.class.php.

Here is the call graph for this function:

Here is the caller graph for this function:

process_chunk ( data)

Get one chunk of parsed data and make it simpler adding attributes as tags and delegating to dispatch_chunk() the procesing of the resulting chunk

Reimplemented from progressive_parser_processor.

Definition at line 83 of file simplified_parser_processor.class.php.

Here is the call graph for this function:

process_pending_startend_notifications ( path,
action 
) [protected]

Adjust start/end til finding one match start/end path (included)

This will trigger all the pending {

See also:
notify_path_start} and {
notify_path_end} calls for one given path and action
Parameters:
stringpath the path to look for as limit
stringaction the action to look for as limit

Definition at line 212 of file simplified_parser_processor.class.php.

Here is the call graph for this function:

Here is the caller graph for this function:

selected_parent_exists ( path) [protected]

Returns the first selected parent if available or false

Definition at line 250 of file simplified_parser_processor.class.php.

Here is the call graph for this function:


Field Documentation

$parentpaths [protected]

Definition at line 42 of file simplified_parser_processor.class.php.

$parentsinfo [protected]

Definition at line 43 of file simplified_parser_processor.class.php.

$paths [protected]

Definition at line 41 of file simplified_parser_processor.class.php.

$startendinfo [protected]

Definition at line 44 of file simplified_parser_processor.class.php.


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