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

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

Detailed Description

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

TODO: Finish phpdocs

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


Constructor & Destructor Documentation

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


Member Function Documentation

add_setting ( setting) [protected]

Definition at line 203 of file base_task.class.php.

Here is the caller graph for this function:

add_step ( step)

Definition at line 118 of file base_task.class.php.

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.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the caller graph for this function:

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.

Definition at line 102 of file base_task.class.php.

Here is the caller graph for this function:

Definition at line 98 of file base_task.class.php.

Here is the caller graph for this function:

Definition at line 110 of file base_task.class.php.

Here is the caller graph for this function:

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.

Here is the caller graph for this function:

get_setting_value ( name)

Definition at line 94 of file base_task.class.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 66 of file base_task.class.php.

get_steps ( )

Definition at line 62 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.

Here is the call graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

set_plan ( plan)

Definition at line 127 of file base_task.class.php.

Here is the call graph for this function:

setting_exists ( name)

Definition at line 90 of file base_task.class.php.


Field Documentation

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


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