|
Moodle
2.2.1
http://www.collinsharper.com
|
Public Member Functions | |||||
| __construct ($name, $path, array $recipe=array(), $grouped=false) | |||||
| set_processing_object ($pobject) | |||||
| set_processing_method ($pmethod) | |||||
| set_start_method ($smethod) | |||||
| set_end_method ($emethod) | |||||
| set_tags ($tags) | |||||
| set_dropped_fields (array $fields) | |||||
| set_renamed_fields (array $fields) | |||||
| set_new_fields (array $fields) | |||||
| apply_recipes (array $data) | |||||
| get_name () | |||||
| get_path () | |||||
| is_grouped () | |||||
| get_processing_object () | |||||
| get_processing_method () | |||||
| get_start_method () | |||||
| get_end_method () | |||||
| get_tags () | |||||
Protected Member Functions | |||||
the element given name | |||||
end of public API ////////////////////////////////////////////////////// Makes sure the given name is a valid element name Note it may look as if we used exceptions for code flow control here. That's not the case as we actually validate the code, not the user data. And the code is supposed to be correct.
| |||||
| validate_name ($name) | |||||
| validate_pobject ($pobject) | |||||
Protected Attributes | |||||
| $name | |||||
| $path | |||||
| $grouped | |||||
| $pobject = null | |||||
| $pmethod = null | |||||
| $smethod = null | |||||
| $emethod = null | |||||
| $tags = null | |||||
| $dropfields = array() | |||||
| $renamefields = array() | |||||
| $newfields = array() | |||||
Class representing a path to be converted from XML file
This was created as a copy of restore_path_element and should be refactored probably.
| __construct | ( | $ | name, |
| $ | path, | ||
| array $ | recipe = array(), |
||
| $ | grouped = false |
||
| ) |
| apply_recipes | ( | array $ | data | ) |
Cooks the parsed tags data by applying known recipes
Recipes are used for common trivial operations like adding new fields or renaming fields. The handler's processing method receives cooked data.
| array | $data | the contents of the element |
Definition at line 970 of file lib.php.

| get_end_method | ( | ) |
| get_start_method | ( | ) |
| is_grouped | ( | ) |
| set_dropped_fields | ( | array $ | fields | ) |
| set_end_method | ( | $ | emethod | ) |
| set_new_fields | ( | array $ | fields | ) |
| set_processing_method | ( | $ | pmethod | ) |
| set_processing_object | ( | $ | pobject | ) |
| set_renamed_fields | ( | array $ | fields | ) |
| set_start_method | ( | $ | smethod | ) |
| set_tags | ( | $ | tags | ) |
| validate_name | ( | $ | name | ) | [protected] |
| validate_pobject | ( | $ | pobject | ) | [protected] |
Makes sure that the given object is a valid processing object
The processing object must be an object providing at least element's processing method or path-reached-end event listener or path-reached-start listener method.
Note it may look as if we used exceptions for code flow control here. That's not the case as we actually validate the code, not the user data. And the code is supposed to be correct.
| object | $pobject |
| convert_path_exception |
Definition at line 1104 of file lib.php.

