Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
Instantiable class representing one nestable element (non final) piece of information on backup. More...
Public Member Functions | |
__construct ($name, $attributes=null, $final_elements=null) | |
Constructor - instantiates one backup_nested_element, specifying its basic info. | |
add_attributes ($attributes) | |
add_child ($element) | |
add_final_elements ($final_elements) | |
add_optigroup ($optigroup) | |
annotate_files ($component, $filearea, $elementname, $filesctxid=null) | |
annotate_ids ($itemname, $elementname) | |
clean_value () | |
clean_values () | |
destroy () | |
Destroy all circular references. | |
fill_values ($values) | |
Simple filler that, matching by name, will fill both attributes and final elements depending of this nested element, debugging info about non-matching elements and/or elements present in both places. | |
get_attribute ($name) | |
get_attributes () | |
Public API starts here. | |
get_child ($name) | |
get_children () | |
get_counter () | |
get_file_annotations () | |
Returns one array containing the element in the @backup_structure and the areas to be searched. | |
get_final_element ($name) | |
get_final_elements () | |
Public API starts here. | |
get_level () | |
get_logs () | |
Returns the logs. | |
get_name () | |
Public API starts here. | |
get_optigroup () | |
get_parent () | |
get_results () | |
Returns the results. | |
get_source_array () | |
get_source_sql () | |
get_source_table () | |
get_source_table_sortby () | |
get_value () | |
is_set () | |
process ($processor) | |
Process the nested element. | |
set_source_alias ($dbname, $finalelementname) | |
set_source_array ($arr) | |
set_source_sql ($sql, $params) | |
set_source_table ($table, $params, $sortby=null) | |
set_value ($value) | |
to_string ($showvalue=false) | |
Protected Member Functions | |
add_log ($message, $level, $a=null, $depth=null, $display=false) | |
Saves a log message to an array. | |
add_result ($result) | |
Saves the results to an array. | |
add_used ($element) | |
check_and_set_used ($element) | |
convert_sql_params ($params) | |
convert_table_params ($params) | |
find_element ($param) | |
find_element_by_path ($path) | |
find_first_parent_by_name ($name) | |
get_grandoptigroupelement_or_grandparent () | |
get_grandparent () | |
get_iterator ($processor) | |
Returns one PHP iterator over each "ocurrence" of this nested element (array or DB recordset). | |
get_new_attribute ($name) | |
Returns one instace of the @base_attribute class to work with when attributes are added simply by name. | |
get_new_final_element ($name) | |
Returns one instace of the @final_element class to work with when final_elements are added simply by name. | |
get_used () | |
set_parent ($element) | |
set_used ($used) | |
validate_name ($name) | |
Instantiable class representing one nestable element (non final) piece of information on backup.
backup_nested_element::__construct | ( | $name, | |
$attributes = null, | |||
$final_elements = null ) |
Constructor - instantiates one backup_nested_element, specifying its basic info.
string | $name | name of the element |
array | $attributes | attributes this element will handle (optional, defaults to null) |
array | $final_elements | this element will handle (optional, defaults to null) |
Reimplemented from base_nested_element.
Reimplemented in backup_logstore_database_nested_element.
|
inherited |
Reimplemented in backup_optigroup_element, and base_optigroup.
|
inherited |
Reimplemented in base_optigroup.
|
protected |
Saves a log message to an array.
string | $message | to add to the logs |
int | $level | level of importance backup::LOG_DEBUG and other constants |
mixed | $a | to be included in $message |
int | $depth | of the message |
display | $bool | supporting translation via get_string() if true |
void |
|
protected |
Saves the results to an array.
array | $result | associative array |
void |
|
protectedinherited |
Reimplemented in base_optigroup.
|
inherited |
Reimplemented from base_atom.
|
inherited |
Reimplemented from base_final_element.
|
inherited |
backup_nested_element::fill_values | ( | $values | ) |
Simple filler that, matching by name, will fill both attributes and final elements depending of this nested element, debugging info about non-matching elements and/or elements present in both places.
Accept both arrays and objects.
|
protected |
Returns one PHP iterator over each "ocurrence" of this nested element (array or DB recordset).
Delegated to backup_structure_dbops class
Reimplemented in backup_logstore_database_nested_element.
|
inherited |
Reimplemented in backup_optigroup_element, and base_optigroup.
backup_nested_element::get_logs | ( | ) |
Returns the logs.
array | of log objects |
|
protected |
Returns one instace of the @base_attribute class to work with when attributes are added simply by name.
Reimplemented from base_final_element.
Reimplemented in backup_optigroup_element.
|
protected |
Returns one instace of the @final_element class to work with when final_elements are added simply by name.
Reimplemented from base_nested_element.
Reimplemented in backup_optigroup_element.
backup_nested_element::get_results | ( | ) |
Returns the results.
associative | array of results |
|
inherited |
Reimplemented from base_atom.
backup_nested_element::process | ( | $processor | ) |
Process the nested element.
object | $processor | the processor |
void |
Implements processable.
Reimplemented in backup_optigroup_element.
|
protectedinherited |
Reimplemented in backup_optigroup_element, and base_optigroup.
|
inherited |
Reimplemented from base_atom.
|
inherited |
Reimplemented from base_final_element.