The following files exists in this folder. Click to view.
phpdoc-cache-file_6891d35d0ab63e1d1b975f523c11a018.dat1 lines ASCII Unix (LF) O:39:"phpDocumentor\Descriptor\FileDescriptor":22:{s:7:" * hash";s:32:"d5d140fefcdfba7fd10747fff4d16d24";s:7:" * path";s:14:"TConfigure.php";s:9:" * source";s:950:"<?php
namespace Anax;
/**
* Trait implementing reading from config-file and storing options in $this->config.
*
*/
trait TConfigure
{
/**
* Properties
*
*/
private $config = []; // Store all config as an array
/**
* Read configuration from file or array'.
*
* @param array/string $what is an array with key/value config options or a file
* to be included which returns such an array.
* @return $this for chaining.
*/
public function configure($what)
{
if (is_array($what)) {
$options = $what;
}
elseif (is_readable($what)) {
$options = include $what;
}
else {
throw new Exception("Configure item '" . htmlentities($what)
. "' is not an array nor a readable file.");
}
$this->config = array_merge($this->config, $options);
return $this->config;
}
}
";s:19:"