|
Moodle
2.2.1
http://www.collinsharper.com
|


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 | |
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.
| __construct | ( | array $ | paths = array() | ) |
Reimplemented from simplified_parser_processor.
Definition at line 46 of file grouped_parser_processor.class.php.

| add_missing_sub | ( | $ | grouped, |
| $ | path, | ||
| $ | tags | ||
| ) | [protected] |
Add non-existing subarray elements
Definition at line 182 of file grouped_parser_processor.class.php.

| add_path | ( | $ | path, |
| $ | grouped = false |
||
| ) |
Definition at line 52 of file grouped_parser_processor.class.php.


| after_path | ( | $ | path | ) |
The parser fires this each time one path has been parsed
| string | $path | xml path which parsing has ended |
Reimplemented from simplified_parser_processor.
Definition at line 89 of file grouped_parser_processor.class.php.

| before_path | ( | $ | path | ) |
The parser fires this each time one path is going to be parsed
| string | $path | xml path which parsing has started |
Reimplemented from simplified_parser_processor.
Definition at line 78 of file grouped_parser_processor.class.php.

| 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.


| 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.

| 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.


| path_is_grouped | ( | $ | path | ) | [protected] |
Definition at line 129 of file grouped_parser_processor.class.php.

| 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.

$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.