ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Setup\Objective\MigrationObjective Class Reference

handles a Migration More...

+ Inheritance diagram for ILIAS\Setup\Objective\MigrationObjective:
+ Collaboration diagram for ILIAS\Setup\Objective\MigrationObjective:

Public Member Functions

 __construct (Setup\Migration $migration, ?int $steps=null)
 
 getHash ()
 Uses hashed Path. More...
 
 getLabel ()
 @inheritdocs More...
 
 isNotable ()
 Defaults to 'true'. More...
 
 getPreconditions (Setup\Environment $environment)
 @inheritdocs More...
 
 isApplicable (Setup\Environment $environment)
 @inheritDoc More...
 
- Public Member Functions inherited from ILIAS\Setup\Objective
 getHash ()
 Get a hash for this objective. More...
 
 getLabel ()
 Get a label that describes this objective. More...
 
 isNotable ()
 Get to know if this is an interesting objective for a human. More...
 
 getPreconditions (Environment $environment)
 Objectives might depend on other objectives. More...
 
 achieve (Environment $environment)
 Objectives can be achieved. More...
 
 isApplicable (Environment $environment)
 Get to know whether the objective is applicable. More...
 

Protected Attributes

Setup Migration $migration
 
int $steps
 

Detailed Description

handles a Migration

Definition at line 28 of file MigrationObjective.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Setup\Objective\MigrationObjective::__construct ( Setup\Migration  $migration,
?int  $steps = null 
)

Definition at line 33 of file MigrationObjective.php.

34 {
35 $this->migration = $migration;
36 $this->steps = $steps ?? $migration->getDefaultAmountOfStepsPerRun();
37 }

References ILIAS\Setup\Objective\MigrationObjective\$migration, and ILIAS\Setup\Objective\MigrationObjective\$steps.

Member Function Documentation

◆ getHash()

ILIAS\Setup\Objective\MigrationObjective::getHash ( )

Uses hashed Path.

@inheritdocs

Implements ILIAS\Setup\Objective.

Definition at line 43 of file MigrationObjective.php.

43 : string
44 {
45 return hash("sha256", self::class . '' . get_class($this->migration));
46 }

◆ getLabel()

ILIAS\Setup\Objective\MigrationObjective::getLabel ( )

@inheritdocs

Implements ILIAS\Setup\Objective.

Definition at line 51 of file MigrationObjective.php.

51 : string
52 {
53 return $this->migration->getLabel();
54 }

◆ getPreconditions()

ILIAS\Setup\Objective\MigrationObjective::getPreconditions ( Setup\Environment  $environment)

@inheritdocs

Definition at line 68 of file MigrationObjective.php.

68 : array
69 {
70 return $this->migration->getPreconditions($environment);
71 }

◆ isApplicable()

ILIAS\Setup\Objective\MigrationObjective::isApplicable ( Setup\Environment  $environment)

@inheritDoc

Definition at line 126 of file MigrationObjective.php.

126 : bool
127 {
128 $this->migration->prepare($environment);
129
130 return $this->migration->getRemainingAmountOfSteps() > 0;
131 }

◆ isNotable()

ILIAS\Setup\Objective\MigrationObjective::isNotable ( )

Defaults to 'true'.

@inheritdocs

Implements ILIAS\Setup\Objective.

Definition at line 60 of file MigrationObjective.php.

60 : bool
61 {
62 return true;
63 }

Field Documentation

◆ $migration

Setup Migration ILIAS\Setup\Objective\MigrationObjective::$migration
protected

◆ $steps

int ILIAS\Setup\Objective\MigrationObjective::$steps
protected

The documentation for this class was generated from the following file: