ILIAS  release_7 Revision v7.30-3-g800a261c036
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_ILIAS_INI = "resource_ilias_ini";
18 const RESOURCE_CLIENT_INI = "resource_client_ini";
19 const RESOURCE_SETTINGS_FACTORY = "resource_settings_factory";
20 const RESOURCE_CLIENT_ID = "resource_client_id";
21 const RESOURCE_PLUGIN_ADMIN = "resource_plugin_admin";
22
29 public function getResource(string $id);
30
34 public function withResource(string $id, $resource) : Environment;
35
41 public function withConfigFor(string $component, $config) : Environment;
42
47 public function getConfigFor(string $component);
48 public function hasConfigFor(string $component) : bool;
49}
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
hasConfigFor(string $component)
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
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...