ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ConfigAwareTrait.php
Go to the documentation of this file.
1<?php
2
3namespace League\Flysystem;
4
9{
13 protected $config;
14
20 protected function setConfig($config)
21 {
22 $this->config = $config ? Util::ensureConfig($config) : new Config;
23 }
24
30 public function getConfig()
31 {
32 return $this->config;
33 }
34
42 protected function prepareConfig(array $config)
43 {
44 $config = new Config($config);
45 $config->setFallback($this->getConfig());
46
47 return $config;
48 }
49}
An exception for terminatinating execution or to throw for unit testing.
static ensureConfig($config)
Ensure a Config instance.
Definition: Util.php:226
getConfig()
Get the Config.
setConfig($config)
Set the config.
prepareConfig(array $config)
Convert a config array to a Config object with the correct fallback.