Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

(no description)

Copyright: 2003 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 260 lines (10 kb)
Included or required:0 times
Referenced: 1 time
Includes or requires: 0 files

Defines 1 class

simplified_parser_processor:: (10 methods):
  __construct()
  add_path()
  process_chunk()
  before_path()
  after_path()
  process_pending_startend_notifications()
  postprocess_chunk()
  path_is_selected()
  path_is_selected_parent()
  selected_parent_exists()


Class: simplified_parser_processor  - X-Ref

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
__construct(array $paths = array()   X-Ref
No description

add_path($path)   X-Ref
No description

process_chunk($data)   X-Ref
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


before_path($path)   X-Ref
The parser fires this each time one path is going to be parsed

param: string $path xml path which parsing has started

after_path($path)   X-Ref
The parser fires this each time one path has been parsed

param: string $path xml path which parsing has ended

process_pending_startend_notifications($path, $action)   X-Ref
Adjust start/end til finding one match start/end path (included)

This will trigger all the pending {@see notify_path_start} and
{@see notify_path_end} calls for one given path and action

param: string path the path to look for as limit
param: string action the action to look for as limit

postprocess_chunk($data)   X-Ref
No description

path_is_selected($path)   X-Ref
No description

path_is_selected_parent($path)   X-Ref
No description

selected_parent_exists($path)   X-Ref
Returns the first selected parent if available or false