Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Abstract xml parser processor to to simplify and dispatch parsed chunks. More...
Public Member Functions | |
__construct (array $paths=array()) | |
add_path ($path) | |
after_path ($path) | |
The parser fires this each time one path has been parsed. More... | |
before_path ($path) | |
The parser fires this each time one path is going to be parsed. More... | |
debug_info () | |
process_cdata ($cdata) | |
Perform custom transformations in the processed cdata. More... | |
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. More... | |
receive_chunk ($data) | |
Protected Member Functions | |
dispatch_chunk ($data) | |
Get the already simplified chunk and dispatch it. More... | |
notify_path_end ($path) | |
Get one selected path and notify about end. More... | |
notify_path_start ($path) | |
Get one selected path and notify about start. More... | |
path_is_selected ($path) | |
path_is_selected_parent ($path) | |
postprocess_chunk ($data) | |
process_pending_startend_notifications ($path, $action) | |
Adjust start/end til finding one match start/end path (included) More... | |
selected_parent_exists ($path) | |
Returns the first selected parent if available or false. | |
Protected Attributes | |
$chunks | |
$inittime | |
$parentpaths | |
$parentsinfo | |
$paths | |
$startendinfo | |
Abstract xml parser processor to to simplify and dispatch parsed chunks.
This @progressive_parser_processor handles the requested paths, performing some conversions from the original "propietary array format" used by the @progressive_parser 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
simplified_parser_processor::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.
simplified_parser_processor::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.
|
abstractprotected |
Get the already simplified chunk and dispatch it.
Reimplemented in moodle1_parser_processor, restore_inforef_parser_processor, restore_moodlexml_parser_processor, restore_questions_parser_processor, restore_roles_parser_processor, restore_structure_parser_processor, and restore_users_parser_processor.
|
abstractprotected |
Get one selected path and notify about end.
Reimplemented in moodle1_parser_processor, restore_inforef_parser_processor, restore_moodlexml_parser_processor, restore_questions_parser_processor, restore_roles_parser_processor, restore_structure_parser_processor, and restore_users_parser_processor.
|
abstractprotected |
Get one selected path and notify about start.
Reimplemented in moodle1_parser_processor, restore_inforef_parser_processor, restore_moodlexml_parser_processor, restore_questions_parser_processor, restore_roles_parser_processor, restore_structure_parser_processor, and restore_users_parser_processor.
|
protected |
Reimplemented in restore_structure_parser_processor, and grouped_parser_processor.
|
inherited |
Perform custom transformations in the processed cdata.
Reimplemented in moodle1_parser_processor, restore_questions_parser_processor, restore_roles_parser_processor, restore_structure_parser_processor, and restore_users_parser_processor.
simplified_parser_processor::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.
|
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 |