Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
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. | |
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) 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.
|
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 |