Spaces:
Runtime error
Runtime error
File size: 3,184 Bytes
af2986e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | <?php
namespace Symfony\Config\Framework;
use Symfony\Component\Config\Loader\ParamConfigurator;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class AnnotationsConfig
{
private $enabled;
private $cache;
private $fileCacheDir;
private $debug;
private $_usedProperties = [];
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enabled($value): static
{
$this->_usedProperties['enabled'] = true;
$this->enabled = $value;
return $this;
}
/**
* @default 'php_array'
* @param ParamConfigurator|'none'|'php_array'|'file' $value
* @return $this
*/
public function cache($value): static
{
$this->_usedProperties['cache'] = true;
$this->cache = $value;
return $this;
}
/**
* @default '%kernel.cache_dir%/annotations'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function fileCacheDir($value): static
{
$this->_usedProperties['fileCacheDir'] = true;
$this->fileCacheDir = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function debug($value): static
{
$this->_usedProperties['debug'] = true;
$this->debug = $value;
return $this;
}
public function __construct(array $config = [])
{
if (array_key_exists('enabled', $config)) {
$this->_usedProperties['enabled'] = true;
$this->enabled = $config['enabled'];
unset($config['enabled']);
}
if (array_key_exists('cache', $config)) {
$this->_usedProperties['cache'] = true;
$this->cache = $config['cache'];
unset($config['cache']);
}
if (array_key_exists('file_cache_dir', $config)) {
$this->_usedProperties['fileCacheDir'] = true;
$this->fileCacheDir = $config['file_cache_dir'];
unset($config['file_cache_dir']);
}
if (array_key_exists('debug', $config)) {
$this->_usedProperties['debug'] = true;
$this->debug = $config['debug'];
unset($config['debug']);
}
if ($config) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($config)));
}
}
public function toArray(): array
{
$output = [];
if (isset($this->_usedProperties['enabled'])) {
$output['enabled'] = $this->enabled;
}
if (isset($this->_usedProperties['cache'])) {
$output['cache'] = $this->cache;
}
if (isset($this->_usedProperties['fileCacheDir'])) {
$output['file_cache_dir'] = $this->fileCacheDir;
}
if (isset($this->_usedProperties['debug'])) {
$output['debug'] = $this->debug;
}
return $output;
}
}
|