Spaces:
Runtime error
Runtime error
File size: 5,115 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 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | <?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 UidConfig
{
private $enabled;
private $defaultUuidVersion;
private $nameBasedUuidVersion;
private $nameBasedUuidNamespace;
private $timeBasedUuidVersion;
private $timeBasedUuidNode;
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 null
* @param ParamConfigurator|7|6|4|1 $value
* @return $this
*/
public function defaultUuidVersion($value): static
{
$this->_usedProperties['defaultUuidVersion'] = true;
$this->defaultUuidVersion = $value;
return $this;
}
/**
* @default 5
* @param ParamConfigurator|5|3 $value
* @return $this
*/
public function nameBasedUuidVersion($value): static
{
$this->_usedProperties['nameBasedUuidVersion'] = true;
$this->nameBasedUuidVersion = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function nameBasedUuidNamespace($value): static
{
$this->_usedProperties['nameBasedUuidNamespace'] = true;
$this->nameBasedUuidNamespace = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|7|6|1 $value
* @return $this
*/
public function timeBasedUuidVersion($value): static
{
$this->_usedProperties['timeBasedUuidVersion'] = true;
$this->timeBasedUuidVersion = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function timeBasedUuidNode($value): static
{
$this->_usedProperties['timeBasedUuidNode'] = true;
$this->timeBasedUuidNode = $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('default_uuid_version', $config)) {
$this->_usedProperties['defaultUuidVersion'] = true;
$this->defaultUuidVersion = $config['default_uuid_version'];
unset($config['default_uuid_version']);
}
if (array_key_exists('name_based_uuid_version', $config)) {
$this->_usedProperties['nameBasedUuidVersion'] = true;
$this->nameBasedUuidVersion = $config['name_based_uuid_version'];
unset($config['name_based_uuid_version']);
}
if (array_key_exists('name_based_uuid_namespace', $config)) {
$this->_usedProperties['nameBasedUuidNamespace'] = true;
$this->nameBasedUuidNamespace = $config['name_based_uuid_namespace'];
unset($config['name_based_uuid_namespace']);
}
if (array_key_exists('time_based_uuid_version', $config)) {
$this->_usedProperties['timeBasedUuidVersion'] = true;
$this->timeBasedUuidVersion = $config['time_based_uuid_version'];
unset($config['time_based_uuid_version']);
}
if (array_key_exists('time_based_uuid_node', $config)) {
$this->_usedProperties['timeBasedUuidNode'] = true;
$this->timeBasedUuidNode = $config['time_based_uuid_node'];
unset($config['time_based_uuid_node']);
}
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['defaultUuidVersion'])) {
$output['default_uuid_version'] = $this->defaultUuidVersion;
}
if (isset($this->_usedProperties['nameBasedUuidVersion'])) {
$output['name_based_uuid_version'] = $this->nameBasedUuidVersion;
}
if (isset($this->_usedProperties['nameBasedUuidNamespace'])) {
$output['name_based_uuid_namespace'] = $this->nameBasedUuidNamespace;
}
if (isset($this->_usedProperties['timeBasedUuidVersion'])) {
$output['time_based_uuid_version'] = $this->timeBasedUuidVersion;
}
if (isset($this->_usedProperties['timeBasedUuidNode'])) {
$output['time_based_uuid_node'] = $this->timeBasedUuidNode;
}
return $output;
}
}
|