|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| __construct ($name, $plan=null) | |
| get_name () | |
| get_steps () | |
| get_settings () | |
| get_setting ($name) | |
| setting_exists ($name) | |
| get_setting_value ($name) | |
| get_courseid () | |
| get_basepath () | |
| get_taskbasepath () | |
| get_logger () | |
| log ($message, $level, $a=null, $depth=null, $display=false) | |
| add_step ($step) | |
| set_plan ($plan) | |
| build () | |
| execute () | |
| destroy () | |
| is_checksum_correct ($checksum) | |
| calculate_checksum () | |
Protected Member Functions | |
| define_settings () | |
| add_setting ($setting) | |
Protected Attributes | |
| $name | |
| $plan | |
| $settings | |
| $steps | |
| $built | |
| $executed | |
Abstract class defining the basis for one execution (backup/restore) task
TODO: Finish phpdocs
Definition at line 30 of file base_task.class.php.
| __construct | ( | $ | name, |
| $ | plan = null |
||
| ) |
Constructor - instantiates one object of this class
Reimplemented in backup_task, and restore_task.
Definition at line 43 of file base_task.class.php.
| add_setting | ( | $ | setting | ) | [protected] |
| add_step | ( | $ | step | ) |
Definition at line 118 of file base_task.class.php.
| build | ( | ) | [abstract] |
Function responsible for building the steps of any task (must set the $built property to true)
Reimplemented in mock_backup_task_basepath, mock_backup_task, mock_base_task, backup_block_task, restore_activity_task, backup_activity_task, restore_section_task, backup_section_task, restore_block_task, backup_course_task, restore_course_task, backup_final_task, restore_final_task, backup_root_task, and restore_root_task.
This function will return one unique and stable checksum for one instance of the class implementing it. It's each implementation responsibility to do it recursively if needed and use optional store (caching) of the checksum if necessary/possible
Implements checksumable.
Definition at line 187 of file base_task.class.php.


| define_settings | ( | ) | [abstract, protected] |
This function is invoked on activity creation in order to add all the settings that are associated with one task. The function will, directly, inject the settings in the task.
Reimplemented in mock_backup_task_basepath, restore_activity_task, mock_backup_task, mock_base_task, backup_activity_task, backup_block_task, restore_block_task, backup_final_task, restore_final_task, restore_section_task, backup_course_task, backup_section_task, restore_course_task, restore_root_task, and backup_root_task.

| destroy | ( | ) |
Destroy all circular references. It helps PHP 5.2 a lot!
Definition at line 169 of file base_task.class.php.
| execute | ( | ) |
Function responsible for executing the steps of any task (setting the $executed property to true)
Implements executable.
Reimplemented in backup_activity_task, restore_activity_task, backup_section_task, and restore_section_task.
Definition at line 145 of file base_task.class.php.
| get_basepath | ( | ) |
| get_courseid | ( | ) |
| get_logger | ( | ) |
| get_name | ( | ) |
Definition at line 58 of file base_task.class.php.
| get_setting | ( | $ | name | ) |
Reimplemented in restore_activity_task, backup_activity_task, backup_section_task, and restore_section_task.
Definition at line 70 of file base_task.class.php.

| get_setting_value | ( | $ | name | ) |
Definition at line 94 of file base_task.class.php.


| get_settings | ( | ) |
Definition at line 66 of file base_task.class.php.
| get_steps | ( | ) |
Definition at line 62 of file base_task.class.php.
| get_taskbasepath | ( | ) |
Reimplemented in mock_backup_task_basepath, backup_block_task, backup_activity_task, restore_activity_task, backup_section_task, restore_block_task, backup_course_task, restore_section_task, and restore_course_task.
Definition at line 106 of file base_task.class.php.

| is_checksum_correct | ( | $ | checksum | ) |
Given one checksum, returns if matches object's checksum (true) or no (false)
Implements checksumable.
Definition at line 183 of file base_task.class.php.

| log | ( | $ | message, |
| $ | level, | ||
| $ | a = null, |
||
| $ | depth = null, |
||
| $ | display = false |
||
| ) |
This function will be responsible for handling the params, and to call to the corresponding logger->process() once all modifications in params have been performed
Implements loggable.
Definition at line 114 of file base_task.class.php.


| set_plan | ( | $ | plan | ) |
| setting_exists | ( | $ | name | ) |
Definition at line 90 of file base_task.class.php.
$built [protected] |
Definition at line 37 of file base_task.class.php.
$executed [protected] |
Definition at line 38 of file base_task.class.php.
$name [protected] |
Definition at line 32 of file base_task.class.php.
$plan [protected] |
Definition at line 33 of file base_task.class.php.
$settings [protected] |
Definition at line 34 of file base_task.class.php.
$steps [protected] |
Definition at line 35 of file base_task.class.php.