Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
Abstract class defining the needed stuf for one restore step. More...
Public Member Functions | |
__construct ($name, $task=null) | |
Constructor - instantiates one object of this class. | |
apply_date_offset ($value) | |
Apply course startdate offset based in original course startdate and course_offset_startdate setting Note we are using one static cache here, but by restoreid, so it's ok for concurrence/multiple executions in the same request. | |
decrypt ($value) | |
Returns symmetric-key AES-256 decryption of base64 encoded contents. | |
destroy () | |
Destroy all circular references. | |
execute () | |
This function will perform all the actions necessary to achieve the execution of the plan/part/task. | |
get_name () | |
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. | |
set_task ($task) | |
Protected Attributes | |
string | $name |
One simple name for identification purposes. | |
base_task null | $task |
Task this is part of. | |
Abstract class defining the needed stuf for one restore step.
TODO: Finish phpdocs
restore_step::__construct | ( | $name, | |
$task = null ) |
Constructor - instantiates one object of this class.
Reimplemented from base_step.
restore_step::apply_date_offset | ( | $value | ) |
Apply course startdate offset based in original course startdate and course_offset_startdate setting Note we are using one static cache here, but by restoreid, so it's ok for concurrence/multiple executions in the same request.
Note: The policy is to roll date only for configurations and not for user data. see MDL-9367.
int | $value | Time value (seconds since epoch), or empty for nothing |
int | Time value after applying the date offset, or empty for nothing |
restore_step::decrypt | ( | $value | ) |
Returns symmetric-key AES-256 decryption of base64 encoded contents.
This method is used in restore operations to decrypt contents encrypted with encrypted_final_element automatically decoding (base64) and decrypting contents using the key stored in backup_encryptkey config.
Requires openssl, cipher availability, and key existence (backup automatically sets it if missing). Integrity is provided via HMAC.
string | $value | encrypted_final_element value to decode and decrypt. |
string|null | decoded and decrypted value or null if the operation can not be performed. |
|
inherited |
Destroy all circular references.
It helps PHP 5.2 a lot!
|
inherited |
This function will perform all the actions necessary to achieve the execution of the plan/part/task.
Implemented in backup_activity_task, backup_execution_step, backup_plan, backup_section_task, backup_structure_step, base_plan, base_task, restore_activity_task, restore_execution_step, restore_plan, restore_section_task, and restore_structure_step.
|
inherited |
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.