ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilSettingsFactoryExistsObjective Class Reference
+ Inheritance diagram for ilSettingsFactoryExistsObjective:
+ Collaboration diagram for ilSettingsFactoryExistsObjective:

Public Member Functions

 getHash ()
 
 getLabel ()
 
 isNotable ()
 
 getPreconditions (Setup\Environment $environment)
 
 achieve (Setup\Environment $environment)
 
 isApplicable (Setup\Environment $environment)
 

Detailed Description

Member Function Documentation

◆ achieve()

ilSettingsFactoryExistsObjective::achieve ( Setup\Environment  $environment)

Definition at line 50 of file class.ilSettingsFactoryExistsObjective.php.

50 : Setup\Environment
51 {
52 $db = $environment->getResource(Setup\Environment::RESOURCE_DATABASE);
53
54 if (!($db instanceof \ilDBInterface)) {
55 throw new Setup\UnachievableException("Database does not exist.");
56 }
57
58 return $environment
59 ->withResource(
60 Setup\Environment::RESOURCE_SETTINGS_FACTORY,
61 new \ilSettingsFactory($db)
62 );
63 }
A factory that builds ilSettings that can be used for DI.
Interface ilDBInterface.

References ILIAS\Setup\Environment\getResource().

+ Here is the call graph for this function:

◆ getHash()

ilSettingsFactoryExistsObjective::getHash ( )

Definition at line 28 of file class.ilSettingsFactoryExistsObjective.php.

28 : string
29 {
30 return hash("sha256", self::class);
31 }

◆ getLabel()

ilSettingsFactoryExistsObjective::getLabel ( )

Definition at line 33 of file class.ilSettingsFactoryExistsObjective.php.

33 : string
34 {
35 return "Initialize factory for ilSetting";
36 }

◆ getPreconditions()

ilSettingsFactoryExistsObjective::getPreconditions ( Setup\Environment  $environment)

◆ isApplicable()

ilSettingsFactoryExistsObjective::isApplicable ( Setup\Environment  $environment)

Definition at line 65 of file class.ilSettingsFactoryExistsObjective.php.

65 : bool
66 {
67 $resource = $environment->getResource(Setup\Environment::RESOURCE_SETTINGS_FACTORY);
68
69 return !($resource instanceof ilSettingsFactory);
70 }

◆ isNotable()

ilSettingsFactoryExistsObjective::isNotable ( )

Definition at line 38 of file class.ilSettingsFactoryExistsObjective.php.

38 : bool
39 {
40 return false;
41 }

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