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


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

| add_path | ( | $ | path | ) |
Definition at line 58 of file simplified_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 progressive_parser_processor.
Reimplemented in grouped_parser_processor.
Definition at line 175 of file simplified_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 progressive_parser_processor.
Reimplemented in grouped_parser_processor.
Definition at line 164 of file simplified_parser_processor.class.php.

| dispatch_chunk | ( | $ | data | ) | [abstract, protected] |
Get the already simplified chunk and dispatch it
Reimplemented in mock_grouped_parser_processor, mock_simplified_parser_processor, moodle1_parser_processor, restore_structure_parser_processor, restore_users_parser_processor, restore_questions_parser_processor, restore_moodlexml_parser_processor, restore_inforef_parser_processor, and restore_roles_parser_processor.

| notify_path_end | ( | $ | path | ) | [abstract, protected] |
Get one selected path and notify about end
Reimplemented in mock_grouped_parser_processor, mock_simplified_parser_processor, moodle1_parser_processor, restore_structure_parser_processor, restore_questions_parser_processor, restore_users_parser_processor, restore_roles_parser_processor, restore_inforef_parser_processor, and restore_moodlexml_parser_processor.

| notify_path_start | ( | $ | path | ) | [abstract, protected] |
Get one selected path and notify about start
Reimplemented in mock_grouped_parser_processor, mock_simplified_parser_processor, moodle1_parser_processor, restore_structure_parser_processor, restore_questions_parser_processor, restore_users_parser_processor, restore_roles_parser_processor, restore_inforef_parser_processor, and restore_moodlexml_parser_processor.

| path_is_selected | ( | $ | path | ) | [protected] |
Definition at line 239 of file simplified_parser_processor.class.php.

| path_is_selected_parent | ( | $ | path | ) | [protected] |
Definition at line 243 of file simplified_parser_processor.class.php.

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


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

| process_pending_startend_notifications | ( | $ | path, |
| $ | action | ||
| ) | [protected] |
Adjust start/end til finding one match start/end path (included)
This will trigger all the pending {
| string | path the path to look for as limit |
| string | action the action to look for as limit |
Definition at line 212 of file simplified_parser_processor.class.php.


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

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