Backup implementation for the (tool_log) logstore_database nested element.
Copyright: | 2015 Damyon Wiese <damyon@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 98 lines (3 kb) |
Included or required: | 1 time |
Referenced: | 0 times |
Includes or requires: | 0 files |
backup_logstore_database_nested_element:: (4 methods):
__construct()
get_iterator()
set_source_db()
get_source_db()
Class: backup_logstore_database_nested_element - X-Ref
Custom subclass of backup_nested_element that iterates over an external DB connection.__construct($name, $attributes = null, $finalelements = null) X-Ref |
Constructor - instantiates one backup_nested_element, specifying its basic info. param: string $name name of the element param: array $attributes attributes this element will handle (optional, defaults to null) param: array $finalelements this element will handle (optional, defaults to null) |
get_iterator($processor) X-Ref |
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. param: object $processor the processor |
set_source_db($db) X-Ref |
Set the database we want to use. param: \moodle_database $db |
get_source_db() X-Ref |
Get the database we want to use. return: \moodle_database $db |