ILIAS  release_7 Revision v7.30-3-g800a261c036
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)
 MigrationObjective constructor. More...
 
 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

 $migration
 
 $steps
 

Detailed Description

handles a Migration

Definition at line 10 of file MigrationObjective.php.

Constructor & Destructor Documentation

◆ __construct()

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

MigrationObjective constructor.

Parameters
Setup\Migration$migration

Definition at line 25 of file MigrationObjective.php.

26 {
27 $this->migration = $migration;
28 $this->steps = $steps ?? $migration->getDefaultAmountOfStepsPerRun();
29 }

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 35 of file MigrationObjective.php.

35 : string
36 {
37 return hash("sha256", self::class . '' . get_class($this->migration));
38 }

◆ getLabel()

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

@inheritdocs

Implements ILIAS\Setup\Objective.

Definition at line 43 of file MigrationObjective.php.

43 : string
44 {
45 return $this->migration->getLabel();
46 }

◆ getPreconditions()

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

@inheritdocs

Definition at line 60 of file MigrationObjective.php.

60 : array
61 {
62 return $this->migration->getPreconditions($environment);
63 }

◆ isApplicable()

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

@inheritDoc

Definition at line 118 of file MigrationObjective.php.

118 : bool
119 {
120 $this->migration->prepare($environment);
121
122 return $this->migration->getRemainingAmountOfSteps() > 0;
123 }

◆ isNotable()

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

Defaults to 'true'.

@inheritdocs

Implements ILIAS\Setup\Objective.

Definition at line 52 of file MigrationObjective.php.

52 : bool
53 {
54 return true;
55 }

Field Documentation

◆ $migration

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

◆ $steps

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

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