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


Public Member Functions | |
| __construct ($name) | |
| get_name () | |
| add_task ($task) | |
| get_tasks () | |
| add_result ($result) | |
| get_results () | |
| get_settings () | |
| get_setting ($name) | |
| setting_exists ($name) | |
| build () | |
| is_checksum_correct ($checksum) | |
| calculate_checksum () | |
| execute () | |
| destroy () | |
Protected Attributes | |
| $name | |
| $settings | |
| $tasks | |
| $results | |
| $built | |
Abstract class defining the basis for one execution (backup/restore) plan
TODO: Finish phpdocs
Definition at line 30 of file base_plan.class.php.
| __construct | ( | $ | name | ) |
Constructor - instantiates one object of this class
Reimplemented in restore_plan, and backup_plan.
Definition at line 42 of file base_plan.class.php.
| add_result | ( | $ | result | ) |
Definition at line 73 of file base_plan.class.php.
| add_task | ( | $ | task | ) |
Definition at line 54 of file base_plan.class.php.
| build | ( | ) | [abstract] |
Function responsible for building the tasks of any plan with their corresponding settings (must set the $built property to true)
Reimplemented in mock_base_plan, restore_plan, and backup_plan.
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 134 of file base_plan.class.php.


| destroy | ( | ) |
Destroy all circular references. It helps PHP 5.2 a lot!
Reimplemented in restore_plan, and backup_plan.
Definition at line 155 of file base_plan.class.php.
| execute | ( | ) |
Function responsible for executing the tasks of any plan
Implements executable.
Reimplemented in restore_plan, and backup_plan.
Definition at line 142 of file base_plan.class.php.
| get_name | ( | ) |
Definition at line 50 of file base_plan.class.php.
| get_results | ( | ) |
Definition at line 77 of file base_plan.class.php.
| get_setting | ( | $ | name | ) |
return one setting by name, useful to request root/course settings that are, by definition, unique by name. Throws exception if multiple are found
TODO: Change this to string indexed array for quicker lookup. Not critical
Definition at line 92 of file base_plan.class.php.

| get_settings | ( | ) |
Definition at line 81 of file base_plan.class.php.
| get_tasks | ( | ) |
Definition at line 69 of file base_plan.class.php.
| is_checksum_correct | ( | $ | checksum | ) |
Given one checksum, returns if matches object's checksum (true) or no (false)
Implements checksumable.
Definition at line 130 of file base_plan.class.php.

| setting_exists | ( | $ | name | ) |
Wrapper over () that returns if the requested setting exists or no
Definition at line 112 of file base_plan.class.php.

$built [protected] |
Definition at line 37 of file base_plan.class.php.
$name [protected] |
Definition at line 32 of file base_plan.class.php.
$results [protected] |
Definition at line 35 of file base_plan.class.php.
$settings [protected] |
Definition at line 33 of file base_plan.class.php.
$tasks [protected] |
Definition at line 34 of file base_plan.class.php.