Julius Herrmann 40ae8de197 intitial init
2021-06-13 23:00:07 +02:00

120 lines
2.6 KiB
PHP

<?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 creating config.
*
* @experimental in 5.3
*/
class AnnotationsConfig
{
private $enabled;
private $cache;
private $fileCacheDir;
private $debug;
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enabled($value): self
{
$this->enabled = $value;
return $this;
}
/**
* @default 'none'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function cache($value): self
{
$this->cache = $value;
return $this;
}
/**
* @default '%kernel.cache_dir%/annotations'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function fileCacheDir($value): self
{
$this->fileCacheDir = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function debug($value): self
{
$this->debug = $value;
return $this;
}
public function __construct(array $value = [])
{
if (isset($value['enabled'])) {
$this->enabled = $value['enabled'];
unset($value['enabled']);
}
if (isset($value['cache'])) {
$this->cache = $value['cache'];
unset($value['cache']);
}
if (isset($value['file_cache_dir'])) {
$this->fileCacheDir = $value['file_cache_dir'];
unset($value['file_cache_dir']);
}
if (isset($value['debug'])) {
$this->debug = $value['debug'];
unset($value['debug']);
}
if ([] !== $value) {
throw new InvalidConfigurationException(sprintf('The following keys are not supported by "%s": ', __CLASS__).implode(', ', array_keys($value)));
}
}
public function toArray(): array
{
$output = [];
if (null !== $this->enabled) {
$output['enabled'] = $this->enabled;
}
if (null !== $this->cache) {
$output['cache'] = $this->cache;
}
if (null !== $this->fileCacheDir) {
$output['file_cache_dir'] = $this->fileCacheDir;
}
if (null !== $this->debug) {
$output['debug'] = $this->debug;
}
return $output;
}
}