ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
|
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) | |
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 27 of file class.ilDatabaseUpdateSteps.php.
ilDatabaseUpdateSteps::__construct | ( | Objective | $base | ) |
\ilObjective | $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 47 of file class.ilDatabaseUpdateSteps.php.
|
final |
Implements ILIAS\Setup\Objective.
Definition at line 110 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 61 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 70 of file class.ilDatabaseUpdateSteps.php.
|
final |
Get a label that describes this objective.
Implements ILIAS\Setup\Objective.
Definition at line 78 of file class.ilDatabaseUpdateSteps.php.
|
final |
Get the number of latest database step in this class.
Definition at line 140 of file class.ilDatabaseUpdateSteps.php.
References getSteps().
Referenced by getPreconditions().
|
final |
Implements ILIAS\Setup\Objective.
Definition at line 94 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 121 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 151 of file class.ilDatabaseUpdateSteps.php.
References $steps.
Referenced by Test_ilDatabaseUpdateSteps\_getSteps(), getLatestStepNum(), and getStep().
|
final |
Implements ILIAS\Setup\Objective.
Definition at line 86 of file class.ilDatabaseUpdateSteps.php.
|
protected |
Definition at line 39 of file class.ilDatabaseUpdateSteps.php.
Referenced by __construct(), and getStep().
|
protected |
Definition at line 34 of file class.ilDatabaseUpdateSteps.php.
Referenced by getSteps(), and ilDatabaseUpdateStepsTest\testGetAllSteps().
const ilDatabaseUpdateSteps::STEP_METHOD_PREFIX = "step_" |
Definition at line 29 of file class.ilDatabaseUpdateSteps.php.
Referenced by ilDatabaseUpdateStep\__construct().