Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

(no description)

Copyright: 2010 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com}
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 232 lines (7 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 2 classes

base_plan:: (14 methods):
  __construct()
  get_name()
  add_task()
  get_tasks()
  add_result()
  get_results()
  get_settings()
  get_setting()
  debug_display_all_settings_values()
  setting_exists()
  is_checksum_correct()
  calculate_checksum()
  execute()
  destroy()

base_plan_exception:: (1 method):
  __construct()


Class: base_plan  - X-Ref

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

TODO: Finish phpdocs
__construct($name)   X-Ref
Constructor - instantiates one object of this class


get_name()   X-Ref
No description

add_task($task)   X-Ref
No description

get_tasks()   X-Ref
No description

add_result($result)   X-Ref
Add the passed info to the plan results

At the moment we expect an associative array structure to be merged into
the current results. In the future, some sort of base_result class may
be introduced.

param: array $result associative array describing a result of a task/step

get_results()   X-Ref
Return the results collected via {@link self::add_result()} method

return: array

get_settings()   X-Ref
No description

get_setting($name)   X-Ref
return one setting by name, useful to request root/course settings
that are, by definition, unique by name.

param: string $name name of the setting
return: base_setting

debug_display_all_settings_values()   X-Ref
For debug only. Get a simple test display of all the settings.

return: string

setting_exists($name)   X-Ref
Wrapper over @get_setting() that returns if the requested setting exists or no


is_checksum_correct($checksum)   X-Ref
Function responsible for building the tasks of any plan
with their corresponding settings
(must set the $built property to true)


calculate_checksum()   X-Ref
No description

execute()   X-Ref
Function responsible for executing the tasks of any plan


destroy()   X-Ref
Destroy all circular references. It helps PHP 5.2 a lot!


Class: base_plan_exception  - X-Ref

__construct($errorcode, $a=NULL, $debuginfo=null)   X-Ref
No description