ILIAS
release_7 Revision v7.30-3-g800a261c036
|
This base-class simplifies the creation of (consecutive) database updates. More...
Public Member Functions | |
__construct (Objective $base) | |
getAdditionalPreconditionsForStep (int $num) | |
Get preconditions for steps. More... | |
getHash () | |
The hash for the objective is calculated over the classname and the steps that are contained. More... | |
getLabel () | |
Get a label that describes this objective. More... | |
isNotable () | |
getPreconditions (Environment $environment) | |
achieve (Environment $environment) | |
isApplicable (Environment $environment) | |
getStep (int $num, int $finished=0) | |
Get a database update step. More... | |
getLatestStepNum () | |
Get the number of latest database step in this class. More... | |
Data Fields | |
const | STEP_METHOD_PREFIX = "step_" |
Protected Member Functions | |
getSteps () | |
Get the numbers of the steps in this class. More... | |
Protected Attributes | |
$steps = null | |
$base | |
This base-class simplifies the creation of (consecutive) database updates.
Implement update steps on one or more tables by creating methods that follow this schema:
public function step_1( $db) { ... }
The class will figure out which of them haven't been performed yet and need to be executed.
If the class takes care of only one table or a set of related tables it will be easier to maintain.
If for some reason you rely on other objectives, e.g. steps from other db-update classes, implement getAdditionalPreconditionsForStep
.
Definition at line 25 of file class.ilDatabaseUpdateSteps.php.
ilDatabaseUpdateSteps::__construct | ( | Objective | $base | ) |
Objective | $base | for the update steps, i.e. the objective that should have been reached before the steps of this class can even begin. Most probably this should be . |
Definition at line 45 of file class.ilDatabaseUpdateSteps.php.
|
final |
Implements ILIAS\Setup\Objective.
Definition at line 108 of file class.ilDatabaseUpdateSteps.php.
ilDatabaseUpdateSteps::getAdditionalPreconditionsForStep | ( | int | $num | ) |
Get preconditions for steps.
The previous step will automatically be a precondition of every step but will not be returned from this method.
Definition at line 59 of file class.ilDatabaseUpdateSteps.php.
Referenced by getStep().
|
final |
The hash for the objective is calculated over the classname and the steps that are contained.
Implements ILIAS\Setup\Objective.
Definition at line 68 of file class.ilDatabaseUpdateSteps.php.
|
final |
Get a label that describes this objective.
Implements ILIAS\Setup\Objective.
Definition at line 76 of file class.ilDatabaseUpdateSteps.php.
|
final |
Get the number of latest database step in this class.
Definition at line 146 of file class.ilDatabaseUpdateSteps.php.
References getSteps().
Referenced by getPreconditions().
|
final |
Implements ILIAS\Setup\Objective.
Definition at line 92 of file class.ilDatabaseUpdateSteps.php.
References $log, getLatestStepNum(), ILIAS\Setup\Environment\getResource(), and getStep().
|
final |
Get a database update step.
Optionally tell which step is known to have been finished to exclude it from the preconditions of the newer steps.
Definition at line 127 of file class.ilDatabaseUpdateSteps.php.
References $base, getAdditionalPreconditionsForStep(), and getSteps().
Referenced by getPreconditions().
|
finalprotected |
Get the numbers of the steps in this class.
Definition at line 157 of file class.ilDatabaseUpdateSteps.php.
References $steps.
Referenced by Test_ilDatabaseUpdateSteps\_getSteps(), getLatestStepNum(), and getStep().
|
final |
Implements ILIAS\Setup\Objective.
Definition at line 116 of file class.ilDatabaseUpdateSteps.php.
|
final |
Implements ILIAS\Setup\Objective.
Definition at line 84 of file class.ilDatabaseUpdateSteps.php.
|
protected |
Definition at line 37 of file class.ilDatabaseUpdateSteps.php.
Referenced by __construct(), and getStep().
|
protected |
Definition at line 32 of file class.ilDatabaseUpdateSteps.php.
Referenced by getSteps(), and ilDatabaseUpdateStepsTest\testGetAllSteps().
const ilDatabaseUpdateSteps::STEP_METHOD_PREFIX = "step_" |
Definition at line 27 of file class.ilDatabaseUpdateSteps.php.
Referenced by ilDatabaseUpdateStep\__construct().