ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\FileDelivery\Setup\BaseDirObjective Class Reference
+ Inheritance diagram for ILIAS\FileDelivery\Setup\BaseDirObjective:
+ Collaboration diagram for ILIAS\FileDelivery\Setup\BaseDirObjective:

Public Member Functions

 getArtifactPath ()
 
 buildIn (Environment $env)
 
 getArtifactName ()
 
 build ()
 
 getPreconditions (Environment $environment)
 Objectives might depend on other objectives. More...
 
- Public Member Functions inherited from ILIAS\FileDelivery\Setup\BuildStaticConfigStoredObjective
 getArtifactName ()
 
 build ()
 
 buildIn (Environment $env)
 
 getPreconditions (Environment $environment)
 Objectives might depend on other objectives. More...
 
 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...
 
 achieve (Environment $environment)
 Objectives can be achieved. More...
 
 isApplicable (Environment $environment)
 Get to know whether the objective is applicable. More...
 
 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...
 

Static Public Member Functions

static get ()
 
- Static Public Member Functions inherited from ILIAS\FileDelivery\Setup\BuildStaticConfigStoredObjective
static PATH ()
 

Data Fields

const BASE_DIR = './src/FileDelivery/artifacts/base_dir.php'
 

Protected Attributes

array $data = []
 

Additional Inherited Members

- Protected Member Functions inherited from ILIAS\FileDelivery\Setup\BuildStaticConfigStoredObjective
 getPath ()
 
 makeDirectoryFor (string $path)
 
- Static Protected Member Functions inherited from ILIAS\FileDelivery\Setup\BuildStaticConfigStoredObjective
static saveName (string $name)
 

Detailed Description

Author
Fabian Schmid fabia.nosp@m.n@sr.nosp@m..solu.nosp@m.tion.nosp@m.s

Definition at line 30 of file BaseDirObjective.php.

Member Function Documentation

◆ build()

ILIAS\FileDelivery\Setup\BaseDirObjective::build ( )

Reimplemented from ILIAS\FileDelivery\Setup\BuildStaticConfigStoredObjective.

Definition at line 60 of file BaseDirObjective.php.

60 : Artifact
61 {
62 return new ArrayArtifact($this->data);
63 }

Referenced by ILIAS\FileDelivery\Setup\BaseDirObjective\buildIn().

+ Here is the caller graph for this function:

◆ buildIn()

ILIAS\FileDelivery\Setup\BaseDirObjective::buildIn ( Environment  $env)

Reimplemented from ILIAS\FileDelivery\Setup\BuildStaticConfigStoredObjective.

Definition at line 42 of file BaseDirObjective.php.

42 : Artifact
43 {
45 if ($ilias_ini instanceof \ilIniFile) {
46 $base_dir = $ilias_ini->readVariable('clients', 'datadir');
47 $client_id = $ilias_ini->readVariable('clients', 'default');
48 if (!empty($base_dir) && !empty($client_id)) {
49 $this->data['base_dir'] = rtrim(rtrim($base_dir, '/') . '/' . $client_id, '/') . '/';
50 }
51 }
52 return $this->build();
53 }
string $client_id
Definition: class.ilias.php:36
INIFile Parser Early access in init proceess! Avoid further dependencies like logging or other servic...
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.

References ILIAS\$client_id, ILIAS\FileDelivery\Setup\BaseDirObjective\build(), ILIAS\Setup\Environment\getResource(), and ILIAS\Setup\Environment\RESOURCE_ILIAS_INI.

+ Here is the call graph for this function:

◆ get()

static ILIAS\FileDelivery\Setup\BaseDirObjective::get ( )
static

Definition at line 73 of file BaseDirObjective.php.

73 : ?string
74 {
75 static $base;
76
77 if ($base !== null) {
78 return $base;
79 }
80
81 if (is_readable(self::PATH())) {
82 $data = require self::PATH();
83 }
84
85 return $base = $data['base_dir'] ?? null;
86 }

References ILIAS\FileDelivery\Setup\BaseDirObjective\$data, and ILIAS\FileDelivery\Setup\BuildStaticConfigStoredObjective\PATH().

Referenced by ILIAS\FileDelivery\Token\Signer\Payload\ShortFilePayload\__construct(), and ILIAS\FileDelivery\Token\Signer\Payload\ShortFilePayload\getUri().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getArtifactName()

ILIAS\FileDelivery\Setup\BaseDirObjective::getArtifactName ( )

Reimplemented from ILIAS\FileDelivery\Setup\BuildStaticConfigStoredObjective.

Definition at line 55 of file BaseDirObjective.php.

55 : string
56 {
57 return 'base_dir';
58 }

◆ getArtifactPath()

ILIAS\FileDelivery\Setup\BaseDirObjective::getArtifactPath ( )

◆ getPreconditions()

ILIAS\FileDelivery\Setup\BaseDirObjective::getPreconditions ( Environment  $environment)

Objectives might depend on other objectives.

Exceptions
UnachievableExceptionif the objective is not achievable
Returns
Objective[]

Reimplemented from ILIAS\FileDelivery\Setup\BuildStaticConfigStoredObjective.

Definition at line 66 of file BaseDirObjective.php.

66 : array
67 {
68 return [
69 new \ilIniFilesLoadedObjective(),
70 ];
71 }

Field Documentation

◆ $data

array ILIAS\FileDelivery\Setup\BaseDirObjective::$data = []
protected

Definition at line 34 of file BaseDirObjective.php.

Referenced by ILIAS\FileDelivery\Setup\BaseDirObjective\get().

◆ BASE_DIR

const ILIAS\FileDelivery\Setup\BaseDirObjective::BASE_DIR = './src/FileDelivery/artifacts/base_dir.php'

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