ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
Environment.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2019 Richard Klees <richard.klees@concepts-and-training.de> Extended GPL, see docs/LICENSE */
4
5namespace ILIAS\Setup;
6
11interface Environment
12{
13 // We define some resources that will definitely be requried. We allow for
14 // new identifiers, though, to be open for extensions and the future.
15 const RESOURCE_DATABASE = "resource_database";
16 const RESOURCE_ADMIN_INTERACTION = "resource_admin_interaction";
17 const RESOURCE_ACHIEVEMENT_TRACKER = "resource_achievement_tracker";
18 const RESOURCE_ILIAS_INI = "resource_ilias_ini";
19 const RESOURCE_CLIENT_INI = "resource_client_ini";
20 const RESOURCE_SETTINGS_FACTORY = "resource_settings_factory";
21
28 public function getResource(string $id);
29
33 public function withResource(string $id, $resource) : Environment;
34
40 public function withConfigFor(string $component, $config) : Environment;
41
46 public function getConfigFor(string $component);
47}
An exception for terminatinating execution or to throw for unit testing.
An environment holds resources to be used in the setup process.
Definition: Environment.php:12
getConfigFor(string $component)
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
withResource(string $id, $resource)
withConfigFor(string $component, $config)
Stores a config for some component in the environment.
if(!array_key_exists('PATH_INFO', $_SERVER)) $config
Definition: metadata.php:68