ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilDBStepReaderExistsObjective.php
Go to the documentation of this file.
1<?php
2
21
23{
24 public function getHash(): string
25 {
26 return hash("sha256", self::class);
27 }
28
29 public function getLabel(): string
30 {
31 return "The step reader for database update steps exists.";
32 }
33
34 public function isNotable(): bool
35 {
36 return true;
37 }
38
39 public function getPreconditions(Environment $environment): array
40 {
41 return [
43 ];
44 }
45
46 public function achieve(Environment $environment): Environment
47 {
48 return $environment
50 ilDBStepReader::class,
51 new ilDBStepReader()
52 );
53 }
54
58 public function isApplicable(Environment $environment): bool
59 {
60 $execution_db = $environment->getResource(ilDBStepReader::class);
61 return is_null($execution_db);
62 }
63}
isNotable()
Get to know if this is an interesting objective for a human.
achieve(Environment $environment)
Objectives can be achieved.
getPreconditions(Environment $environment)
Objectives might depend on other objectives.
isApplicable(Environment $environment)
@inheritDoc
getLabel()
Get a label that describes this objective.
An environment holds resources to be used in the setup process.
Definition: Environment.php:28
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
withResource(string $id, $resource)
An objective is a desired state of the system that is supposed to be created by the setup.
Definition: Objective.php:31