ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
ilDatabaseSetupAgent Class Reference
+ Inheritance diagram for ilDatabaseSetupAgent:
+ Collaboration diagram for ilDatabaseSetupAgent:

Public Member Functions

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

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.

References $refinery.

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

Member Function Documentation

◆ getArrayToConfigTransformation()

ilDatabaseSetupAgent::getArrayToConfigTransformation ( )

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

References $data, and $password.

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  }
$data
Definition: storeScorm.php:23
$password
Definition: cron.php:14
A transformation is a function from one datatype to another.

◆ getBuildArtifactObjective()

ilDatabaseSetupAgent::getBuildArtifactObjective ( )

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)

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

34  {
35  throw new \LogicException("NYI!");
36  }

◆ getInstallObjective()

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

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

References $config.

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

◆ getUpdateObjective()

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

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

References $config.

76  : Setup\Objective
77  {
78  return new \ilDatabaseUpdatedObjective($config, false);
79  }
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68

◆ hasConfig()

ilDatabaseSetupAgent::hasConfig ( )

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: