Moodle  2.2.1
http://www.collinsharper.com
base_plan Class Reference
Inheritance diagram for base_plan:
Collaboration diagram for base_plan:

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

Detailed Description

Abstract class defining the basis for one execution (backup/restore) plan

TODO: Finish phpdocs

Definition at line 30 of file base_plan.class.php.


Constructor & Destructor Documentation

__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.


Member Function Documentation

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.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

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.

Here is the caller graph for this function:

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.

Here is the call graph for this function:

setting_exists ( name)

Wrapper over () that returns if the requested setting exists or no

Definition at line 112 of file base_plan.class.php.

Here is the call graph for this function:


Field Documentation

$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.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations