Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
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. | |
before_path ($path) | |
The parser fires this each time one path is going to be parsed. | |
debug_info () | |
process_cdata ($cdata) | |
Perform custom transformations in the processed cdata. | |
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. | |
receive_chunk ($data) | |
Protected Member Functions | |
dispatch_chunk ($data) | |
Get the already simplified chunk and dispatch it. | |
notify_path_end ($path) | |
Get one selected path and notify about end. | |
notify_path_start ($path) | |
Get one selected path and notify about start. | |
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) | |
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 grouped_parser_processor, and restore_structure_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 |