ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilDatabaseSetupAgent Class Reference
+ Inheritance diagram for ilDatabaseSetupAgent:
+ Collaboration diagram for ilDatabaseSetupAgent:

Public Member Functions

 __construct (Refinery $refinery)
 
 hasConfig ()
 @inheritdocs More...
 
 getConfigInput (Setup\Config $config=null)
 @inheritdocs More...
 
 getArrayToConfigTransformation ()
 @inheritdocs More...
 
 getInstallObjective (Setup\Config $config=null)
 @inheritdocs More...
 
 getUpdateObjective (Setup\Config $config=null)
 @inheritdocs More...
 
 getBuildArtifactObjective ()
 @inheritdocs More...
 

Protected Attributes

 $refinery
 

Detailed Description

Definition at line 10 of file class.ilDatabaseSetupAgent.php.

Constructor & Destructor Documentation

◆ __construct()

ilDatabaseSetupAgent::__construct ( Refinery  $refinery)

Definition at line 17 of file class.ilDatabaseSetupAgent.php.

18 {
19 $this->refinery = $refinery;
20 }

References $refinery.

Member Function Documentation

◆ getArrayToConfigTransformation()

ilDatabaseSetupAgent::getArrayToConfigTransformation ( )

@inheritdocs

Definition at line 41 of file class.ilDatabaseSetupAgent.php.

42 {
43 // TODO: Migrate this to refinery-methods once possible.
44 return $this->refinery->custom()->transformation(function ($data) {
45 $password = $this->refinery->to()->data("password");
46 return new \ilDatabaseSetupConfig(
47 $data["type"] ?? "innodb",
48 $data["host"] ?? "localhost",
49 $data["database"] ?? "ilias",
50 $data["user"] ?? null,
51 $data["password"] ? $password->transform($data["password"]) : null,
52 $data["create_database"] ?? true,
53 $data["collation"] ?? null,
54 $data["port"] ?? 3306,
55 $data["path_to_db_dump"] ?? null
56 );
57 });
58 }
$password
Definition: cron.php:14
A transformation is a function from one datatype to another.
$data
Definition: storeScorm.php:23

References $data, and $password.

◆ getBuildArtifactObjective()

ilDatabaseSetupAgent::getBuildArtifactObjective ( )

@inheritdocs

Definition at line 84 of file class.ilDatabaseSetupAgent.php.

84 : Setup\Objective
85 {
86 return new Setup\NullObjective();
87 }

◆ getConfigInput()

ilDatabaseSetupAgent::getConfigInput ( Setup\Config  $config = null)

@inheritdocs

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

34 {
35 throw new \LogicException("NYI!");
36 }
This describes commonalities between all inputs.
Definition: Input.php:32

◆ getInstallObjective()

ilDatabaseSetupAgent::getInstallObjective ( Setup\Config  $config = null)

@inheritdocs

Definition at line 63 of file class.ilDatabaseSetupAgent.php.

63 : Setup\Objective
64 {
65 return new Setup\ObjectiveCollection(
66 "Complete objectives from Services\Database",
67 false,
70 );
71 }
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68

References $config.

◆ getUpdateObjective()

ilDatabaseSetupAgent::getUpdateObjective ( Setup\Config  $config = null)

@inheritdocs

Definition at line 76 of file class.ilDatabaseSetupAgent.php.

76 : Setup\Objective
77 {
78 return new \ilDatabaseUpdatedObjective($config, false);
79 }

References $config.

◆ hasConfig()

ilDatabaseSetupAgent::hasConfig ( )

@inheritdocs

Definition at line 25 of file class.ilDatabaseSetupAgent.php.

25 : bool
26 {
27 return true;
28 }

Field Documentation

◆ $refinery

ilDatabaseSetupAgent::$refinery
protected

Definition at line 15 of file class.ilDatabaseSetupAgent.php.

Referenced by __construct().


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