Spaces:
Runtime error
Runtime error
File size: 5,374 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 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 | <?php
namespace Symfony\Config\Framework\Assets;
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 PackageConfig
{
private $strictMode;
private $versionStrategy;
private $version;
private $versionFormat;
private $jsonManifestPath;
private $basePath;
private $baseUrls;
private $_usedProperties = [];
/**
* Throw an exception if an entry is missing from the manifest.json
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function strictMode($value): static
{
$this->_usedProperties['strictMode'] = true;
$this->strictMode = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function versionStrategy($value): static
{
$this->_usedProperties['versionStrategy'] = true;
$this->versionStrategy = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function version($value): static
{
$this->_usedProperties['version'] = true;
$this->version = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function versionFormat($value): static
{
$this->_usedProperties['versionFormat'] = true;
$this->versionFormat = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function jsonManifestPath($value): static
{
$this->_usedProperties['jsonManifestPath'] = true;
$this->jsonManifestPath = $value;
return $this;
}
/**
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function basePath($value): static
{
$this->_usedProperties['basePath'] = true;
$this->basePath = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed>|mixed $value
*
* @return $this
*/
public function baseUrls(mixed $value): static
{
$this->_usedProperties['baseUrls'] = true;
$this->baseUrls = $value;
return $this;
}
public function __construct(array $config = [])
{
if (array_key_exists('strict_mode', $config)) {
$this->_usedProperties['strictMode'] = true;
$this->strictMode = $config['strict_mode'];
unset($config['strict_mode']);
}
if (array_key_exists('version_strategy', $config)) {
$this->_usedProperties['versionStrategy'] = true;
$this->versionStrategy = $config['version_strategy'];
unset($config['version_strategy']);
}
if (array_key_exists('version', $config)) {
$this->_usedProperties['version'] = true;
$this->version = $config['version'];
unset($config['version']);
}
if (array_key_exists('version_format', $config)) {
$this->_usedProperties['versionFormat'] = true;
$this->versionFormat = $config['version_format'];
unset($config['version_format']);
}
if (array_key_exists('json_manifest_path', $config)) {
$this->_usedProperties['jsonManifestPath'] = true;
$this->jsonManifestPath = $config['json_manifest_path'];
unset($config['json_manifest_path']);
}
if (array_key_exists('base_path', $config)) {
$this->_usedProperties['basePath'] = true;
$this->basePath = $config['base_path'];
unset($config['base_path']);
}
if (array_key_exists('base_urls', $config)) {
$this->_usedProperties['baseUrls'] = true;
$this->baseUrls = $config['base_urls'];
unset($config['base_urls']);
}
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['strictMode'])) {
$output['strict_mode'] = $this->strictMode;
}
if (isset($this->_usedProperties['versionStrategy'])) {
$output['version_strategy'] = $this->versionStrategy;
}
if (isset($this->_usedProperties['version'])) {
$output['version'] = $this->version;
}
if (isset($this->_usedProperties['versionFormat'])) {
$output['version_format'] = $this->versionFormat;
}
if (isset($this->_usedProperties['jsonManifestPath'])) {
$output['json_manifest_path'] = $this->jsonManifestPath;
}
if (isset($this->_usedProperties['basePath'])) {
$output['base_path'] = $this->basePath;
}
if (isset($this->_usedProperties['baseUrls'])) {
$output['base_urls'] = $this->baseUrls;
}
return $output;
}
}
|