Custom subclass of backup_nested_element that iterates over an external DB connection.
More...
|
| __construct ($name, $attributes=null, $finalelements=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_db () |
| Get the database we want to use.
|
|
| 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_db ($db) |
| Set the database we want to use.
|
|
| set_source_sql ($sql, $params) |
|
| set_source_table ($table, $params, $sortby=null) |
|
| set_value ($value) |
|
| to_string ($showvalue=false) |
|
|
| 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) |
| For sql or table datasources, this will iterate over the "external" DB connection stored in this class instead of the default $DB.
|
|
| 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) |
|
|
array | $aliases |
|
int | $counter |
|
array | $fileannotations |
|
stdClass[] | $logs |
|
mixed | $params |
|
array | $procparams |
|
array | $results |
|
moodle_database | $sourcedb |
| $sourcedb
|
|
string | $sql |
|
string | $table |
|
string | $tablesortby |
|
array | $var_array |
| To be used in case we pass one in-memory structure.
|
|
Custom subclass of backup_nested_element that iterates over an external DB connection.
- Copyright
- 2015 Damyon Wiese damyo.nosp@m.n@mo.nosp@m.odle..nosp@m.com
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
backup_logstore_database_nested_element::__construct |
( |
| $name, |
|
|
| $attributes = null, |
|
|
| $finalelements = null ) |
Constructor - instantiates one backup_nested_element, specifying its basic info.
- Parameters
-
string | $name | name of the element |
array | $attributes | attributes this element will handle (optional, defaults to null) |
array | $finalelements | this element will handle (optional, defaults to null) |
Reimplemented from backup_nested_element.
◆ add_attributes()
base_final_element::add_attributes |
( |
| $attributes | ) |
|
|
inherited |
◆ add_final_elements()
base_nested_element::add_final_elements |
( |
| $final_elements | ) |
|
|
inherited |
◆ add_log()
backup_nested_element::add_log |
( |
| $message, |
|
|
| $level, |
|
|
| $a = null, |
|
|
| $depth = null, |
|
|
| $display = false ) |
|
protectedinherited |
Saves a log message to an array.
- See also
- backup_helper\log()
- Parameters
-
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 |
- Return values
-
◆ add_result()
backup_nested_element::add_result |
( |
| $result | ) |
|
|
protectedinherited |
Saves the results to an array.
- Parameters
-
array | $result | associative array |
- Return values
-
◆ add_used()
base_nested_element::add_used |
( |
| $element | ) |
|
|
protectedinherited |
◆ clean_value()
base_nested_element::clean_value |
( |
| ) |
|
|
inherited |
◆ clean_values()
base_nested_element::clean_values |
( |
| ) |
|
|
inherited |
◆ destroy()
base_nested_element::destroy |
( |
| ) |
|
|
inherited |
Destroy all circular references.
It helps PHP 5.2 a lot!
Reimplemented from base_final_element.
◆ fill_values()
backup_nested_element::fill_values |
( |
| $values | ) |
|
|
inherited |
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.
◆ get_iterator()
backup_logstore_database_nested_element::get_iterator |
( |
| $processor | ) |
|
|
protected |
For sql or table datasources, this will iterate over the "external" DB connection stored in this class instead of the default $DB.
All other cases use the parent default.
- Parameters
-
object | $processor | the processor |
Reimplemented from backup_nested_element.
◆ get_level()
base_final_element::get_level |
( |
| ) |
|
|
inherited |
◆ get_logs()
backup_nested_element::get_logs |
( |
| ) |
|
|
inherited |
Returns the logs.
- Return values
-
◆ get_new_attribute()
backup_nested_element::get_new_attribute |
( |
| $name | ) |
|
|
protectedinherited |
◆ get_new_final_element()
backup_nested_element::get_new_final_element |
( |
| $name | ) |
|
|
protectedinherited |
◆ get_results()
backup_nested_element::get_results |
( |
| ) |
|
|
inherited |
Returns the results.
- Return values
-
associative | array of results |
◆ get_source_db()
backup_logstore_database_nested_element::get_source_db |
( |
| ) |
|
Get the database we want to use.
- Return values
-
◆ get_value()
base_nested_element::get_value |
( |
| ) |
|
|
inherited |
◆ process()
backup_nested_element::process |
( |
| $processor | ) |
|
|
inherited |
◆ set_parent()
base_final_element::set_parent |
( |
| $element | ) |
|
|
protectedinherited |
◆ set_source_db()
backup_logstore_database_nested_element::set_source_db |
( |
| $db | ) |
|
Set the database we want to use.
- Parameters
-
◆ set_value()
base_nested_element::set_value |
( |
| $value | ) |
|
|
inherited |
◆ to_string()
base_nested_element::to_string |
( |
| $showvalue = false | ) |
|
|
inherited |
The documentation for this class was generated from the following file:
- admin/tool/log/store/database/backup/moodle2/backup_logstore_database_nested_element.php