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

Public Member Functions

 __construct (array $paths=array())
 add_path ($path, $grouped=false)
 before_path ($path)
 after_path ($path)

Protected Member Functions

 postprocess_chunk ($data)
 path_is_grouped ($path)
 grouped_parent_exists ($path)
 grouped_child_exists ($path)
 build_currentdata ($grouped, $data)
 add_missing_sub ($grouped, $path, $tags)

Protected Attributes

 $groupedpaths
 $currentdata

Detailed Description

Abstract xml parser processor able to group chunks as configured and dispatch them to other arbitrary methods

This handles the requested paths, allowing to group information under any of them, dispatching them to the methods specified

Note memory increases as you group more and more paths, so use it for well-known structures being smaller enough (never to group MBs into one in-memory structure)

TODO: Complete phpdocs

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


Constructor & Destructor Documentation

__construct ( array paths = array())

Reimplemented from simplified_parser_processor.

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

Here is the call graph for this function:


Member Function Documentation

add_missing_sub ( grouped,
path,
tags 
) [protected]

Add non-existing subarray elements

Definition at line 182 of file grouped_parser_processor.class.php.

Here is the caller graph for this function:

add_path ( path,
grouped = false 
)

Definition at line 52 of file grouped_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 simplified_parser_processor.

Definition at line 89 of file grouped_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 simplified_parser_processor.

Definition at line 78 of file grouped_parser_processor.class.php.

Here is the call graph for this function:

build_currentdata ( grouped,
data 
) [protected]

This function will accumulate the chunk into the specified grouped element for later dispatching once it is complete

Definition at line 168 of file grouped_parser_processor.class.php.

Here is the call graph for this function:

Here is the caller graph for this function:

grouped_child_exists ( path) [protected]

Function that will look for any grouped child for the given path, returning it if found, false if not

Definition at line 154 of file grouped_parser_processor.class.php.

Here is the caller graph for this function:

grouped_parent_exists ( path) [protected]

Function that will look for any grouped parent for the given path, returning it if found, false if not

Definition at line 138 of file grouped_parser_processor.class.php.

Here is the call graph for this function:

Here is the caller graph for this function:

path_is_grouped ( path) [protected]

Definition at line 129 of file grouped_parser_processor.class.php.

Here is the caller graph for this function:

postprocess_chunk ( data) [protected]

Override this method so grouping will be happening here also deciding between accumulating/dispatching

Reimplemented from simplified_parser_processor.

Reimplemented in restore_structure_parser_processor.

Definition at line 112 of file grouped_parser_processor.class.php.

Here is the call graph for this function:


Field Documentation

$currentdata [protected]

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

$groupedpaths [protected]

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


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