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

77 lines
1.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 LockConfig
{
private $enabled;
private $resources;
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enabled($value): self
{
$this->enabled = $value;
return $this;
}
/**
* @param ParamConfigurator|array $value
* @return $this
*/
public function resource(string $name, $value): self
{
$this->resources[$name] = $value;
return $this;
}
public function __construct(array $value = [])
{
if (isset($value['enabled'])) {
$this->enabled = $value['enabled'];
unset($value['enabled']);
}
if (isset($value['resources'])) {
$this->resources = $value['resources'];
unset($value['resources']);
}
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->resources) {
$output['resources'] = $this->resources;
}
return $output;
}
}