Initial Base

This commit is contained in:
2025-10-31 22:07:28 +00:00
parent 629a58b595
commit 3ace0308cf
717 changed files with 107359 additions and 0 deletions

View File

@@ -0,0 +1,92 @@
<?php
namespace Symfony\Config\Doctrine\Orm\EntityManagerConfig;
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 DqlConfig
{
private $stringFunctions;
private $numericFunctions;
private $datetimeFunctions;
private $_usedProperties = [];
/**
* @return $this
*/
public function stringFunction(string $name, mixed $value): static
{
$this->_usedProperties['stringFunctions'] = true;
$this->stringFunctions[$name] = $value;
return $this;
}
/**
* @return $this
*/
public function numericFunction(string $name, mixed $value): static
{
$this->_usedProperties['numericFunctions'] = true;
$this->numericFunctions[$name] = $value;
return $this;
}
/**
* @return $this
*/
public function datetimeFunction(string $name, mixed $value): static
{
$this->_usedProperties['datetimeFunctions'] = true;
$this->datetimeFunctions[$name] = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('string_functions', $value)) {
$this->_usedProperties['stringFunctions'] = true;
$this->stringFunctions = $value['string_functions'];
unset($value['string_functions']);
}
if (array_key_exists('numeric_functions', $value)) {
$this->_usedProperties['numericFunctions'] = true;
$this->numericFunctions = $value['numeric_functions'];
unset($value['numeric_functions']);
}
if (array_key_exists('datetime_functions', $value)) {
$this->_usedProperties['datetimeFunctions'] = true;
$this->datetimeFunctions = $value['datetime_functions'];
unset($value['datetime_functions']);
}
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 (isset($this->_usedProperties['stringFunctions'])) {
$output['string_functions'] = $this->stringFunctions;
}
if (isset($this->_usedProperties['numericFunctions'])) {
$output['numeric_functions'] = $this->numericFunctions;
}
if (isset($this->_usedProperties['datetimeFunctions'])) {
$output['datetime_functions'] = $this->datetimeFunctions;
}
return $output;
}
}

View File

@@ -0,0 +1,52 @@
<?php
namespace Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners;
require_once __DIR__.\DIRECTORY_SEPARATOR.'EntityConfig'.\DIRECTORY_SEPARATOR.'ListenerConfig.php';
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class EntityConfig
{
private $listeners;
private $_usedProperties = [];
public function listener(string $class, array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners\EntityConfig\ListenerConfig
{
if (!isset($this->listeners[$class])) {
$this->_usedProperties['listeners'] = true;
$this->listeners[$class] = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners\EntityConfig\ListenerConfig($value);
} elseif (1 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "listener()" has already been initialized. You cannot pass values the second time you call listener().');
}
return $this->listeners[$class];
}
public function __construct(array $value = [])
{
if (array_key_exists('listeners', $value)) {
$this->_usedProperties['listeners'] = true;
$this->listeners = array_map(fn ($v) => new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners\EntityConfig\ListenerConfig($v), $value['listeners']);
unset($value['listeners']);
}
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 (isset($this->_usedProperties['listeners'])) {
$output['listeners'] = array_map(fn ($v) => $v->toArray(), $this->listeners);
}
return $output;
}
}

View File

@@ -0,0 +1,47 @@
<?php
namespace Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners\EntityConfig;
require_once __DIR__.\DIRECTORY_SEPARATOR.'ListenerConfig'.\DIRECTORY_SEPARATOR.'EventConfig.php';
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class ListenerConfig
{
private $events;
private $_usedProperties = [];
public function event(array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners\EntityConfig\ListenerConfig\EventConfig
{
$this->_usedProperties['events'] = true;
return $this->events[] = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners\EntityConfig\ListenerConfig\EventConfig($value);
}
public function __construct(array $value = [])
{
if (array_key_exists('events', $value)) {
$this->_usedProperties['events'] = true;
$this->events = array_map(fn ($v) => new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners\EntityConfig\ListenerConfig\EventConfig($v), $value['events']);
unset($value['events']);
}
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 (isset($this->_usedProperties['events'])) {
$output['events'] = array_map(fn ($v) => $v->toArray(), $this->events);
}
return $output;
}
}

View File

@@ -0,0 +1,75 @@
<?php
namespace Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners\EntityConfig\ListenerConfig;
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 EventConfig
{
private $type;
private $method;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function type($value): static
{
$this->_usedProperties['type'] = true;
$this->type = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function method($value): static
{
$this->_usedProperties['method'] = true;
$this->method = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('type', $value)) {
$this->_usedProperties['type'] = true;
$this->type = $value['type'];
unset($value['type']);
}
if (array_key_exists('method', $value)) {
$this->_usedProperties['method'] = true;
$this->method = $value['method'];
unset($value['method']);
}
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 (isset($this->_usedProperties['type'])) {
$output['type'] = $this->type;
}
if (isset($this->_usedProperties['method'])) {
$output['method'] = $this->method;
}
return $output;
}
}

View File

@@ -0,0 +1,52 @@
<?php
namespace Symfony\Config\Doctrine\Orm\EntityManagerConfig;
require_once __DIR__.\DIRECTORY_SEPARATOR.'EntityListeners'.\DIRECTORY_SEPARATOR.'EntityConfig.php';
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
/**
* This class is automatically generated to help in creating a config.
*/
class EntityListenersConfig
{
private $entities;
private $_usedProperties = [];
public function entity(string $class, array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners\EntityConfig
{
if (!isset($this->entities[$class])) {
$this->_usedProperties['entities'] = true;
$this->entities[$class] = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners\EntityConfig($value);
} elseif (1 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "entity()" has already been initialized. You cannot pass values the second time you call entity().');
}
return $this->entities[$class];
}
public function __construct(array $value = [])
{
if (array_key_exists('entities', $value)) {
$this->_usedProperties['entities'] = true;
$this->entities = array_map(fn ($v) => new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListeners\EntityConfig($v), $value['entities']);
unset($value['entities']);
}
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 (isset($this->_usedProperties['entities'])) {
$output['entities'] = array_map(fn ($v) => $v->toArray(), $this->entities);
}
return $output;
}
}

View File

@@ -0,0 +1,96 @@
<?php
namespace Symfony\Config\Doctrine\Orm\EntityManagerConfig;
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 FilterConfig
{
private $class;
private $enabled;
private $parameters;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function class($value): static
{
$this->_usedProperties['class'] = true;
$this->class = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enabled($value): static
{
$this->_usedProperties['enabled'] = true;
$this->enabled = $value;
return $this;
}
/**
* @return $this
*/
public function parameter(string $name, mixed $value): static
{
$this->_usedProperties['parameters'] = true;
$this->parameters[$name] = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('class', $value)) {
$this->_usedProperties['class'] = true;
$this->class = $value['class'];
unset($value['class']);
}
if (array_key_exists('enabled', $value)) {
$this->_usedProperties['enabled'] = true;
$this->enabled = $value['enabled'];
unset($value['enabled']);
}
if (array_key_exists('parameters', $value)) {
$this->_usedProperties['parameters'] = true;
$this->parameters = $value['parameters'];
unset($value['parameters']);
}
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 (isset($this->_usedProperties['class'])) {
$output['class'] = $this->class;
}
if (isset($this->_usedProperties['enabled'])) {
$output['enabled'] = $this->enabled;
}
if (isset($this->_usedProperties['parameters'])) {
$output['parameters'] = $this->parameters;
}
return $output;
}
}

View File

@@ -0,0 +1,167 @@
<?php
namespace Symfony\Config\Doctrine\Orm\EntityManagerConfig;
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 MappingConfig
{
private $mapping;
private $type;
private $dir;
private $alias;
private $prefix;
private $isBundle;
private $_usedProperties = [];
/**
* @default true
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function mapping($value): static
{
$this->_usedProperties['mapping'] = true;
$this->mapping = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function type($value): static
{
$this->_usedProperties['type'] = true;
$this->type = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function dir($value): static
{
$this->_usedProperties['dir'] = true;
$this->dir = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function alias($value): static
{
$this->_usedProperties['alias'] = true;
$this->alias = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function prefix($value): static
{
$this->_usedProperties['prefix'] = true;
$this->prefix = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|bool $value
* @return $this
*/
public function isBundle($value): static
{
$this->_usedProperties['isBundle'] = true;
$this->isBundle = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('mapping', $value)) {
$this->_usedProperties['mapping'] = true;
$this->mapping = $value['mapping'];
unset($value['mapping']);
}
if (array_key_exists('type', $value)) {
$this->_usedProperties['type'] = true;
$this->type = $value['type'];
unset($value['type']);
}
if (array_key_exists('dir', $value)) {
$this->_usedProperties['dir'] = true;
$this->dir = $value['dir'];
unset($value['dir']);
}
if (array_key_exists('alias', $value)) {
$this->_usedProperties['alias'] = true;
$this->alias = $value['alias'];
unset($value['alias']);
}
if (array_key_exists('prefix', $value)) {
$this->_usedProperties['prefix'] = true;
$this->prefix = $value['prefix'];
unset($value['prefix']);
}
if (array_key_exists('is_bundle', $value)) {
$this->_usedProperties['isBundle'] = true;
$this->isBundle = $value['is_bundle'];
unset($value['is_bundle']);
}
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 (isset($this->_usedProperties['mapping'])) {
$output['mapping'] = $this->mapping;
}
if (isset($this->_usedProperties['type'])) {
$output['type'] = $this->type;
}
if (isset($this->_usedProperties['dir'])) {
$output['dir'] = $this->dir;
}
if (isset($this->_usedProperties['alias'])) {
$output['alias'] = $this->alias;
}
if (isset($this->_usedProperties['prefix'])) {
$output['prefix'] = $this->prefix;
}
if (isset($this->_usedProperties['isBundle'])) {
$output['is_bundle'] = $this->isBundle;
}
return $output;
}
}

View File

@@ -0,0 +1,98 @@
<?php
namespace Symfony\Config\Doctrine\Orm\EntityManagerConfig;
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 MetadataCacheDriverConfig
{
private $type;
private $id;
private $pool;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function type($value): static
{
$this->_usedProperties['type'] = true;
$this->type = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function id($value): static
{
$this->_usedProperties['id'] = true;
$this->id = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function pool($value): static
{
$this->_usedProperties['pool'] = true;
$this->pool = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('type', $value)) {
$this->_usedProperties['type'] = true;
$this->type = $value['type'];
unset($value['type']);
}
if (array_key_exists('id', $value)) {
$this->_usedProperties['id'] = true;
$this->id = $value['id'];
unset($value['id']);
}
if (array_key_exists('pool', $value)) {
$this->_usedProperties['pool'] = true;
$this->pool = $value['pool'];
unset($value['pool']);
}
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 (isset($this->_usedProperties['type'])) {
$output['type'] = $this->type;
}
if (isset($this->_usedProperties['id'])) {
$output['id'] = $this->id;
}
if (isset($this->_usedProperties['pool'])) {
$output['pool'] = $this->pool;
}
return $output;
}
}

View File

@@ -0,0 +1,98 @@
<?php
namespace Symfony\Config\Doctrine\Orm\EntityManagerConfig;
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 QueryCacheDriverConfig
{
private $type;
private $id;
private $pool;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function type($value): static
{
$this->_usedProperties['type'] = true;
$this->type = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function id($value): static
{
$this->_usedProperties['id'] = true;
$this->id = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function pool($value): static
{
$this->_usedProperties['pool'] = true;
$this->pool = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('type', $value)) {
$this->_usedProperties['type'] = true;
$this->type = $value['type'];
unset($value['type']);
}
if (array_key_exists('id', $value)) {
$this->_usedProperties['id'] = true;
$this->id = $value['id'];
unset($value['id']);
}
if (array_key_exists('pool', $value)) {
$this->_usedProperties['pool'] = true;
$this->pool = $value['pool'];
unset($value['pool']);
}
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 (isset($this->_usedProperties['type'])) {
$output['type'] = $this->type;
}
if (isset($this->_usedProperties['id'])) {
$output['id'] = $this->id;
}
if (isset($this->_usedProperties['pool'])) {
$output['pool'] = $this->pool;
}
return $output;
}
}

View File

@@ -0,0 +1,98 @@
<?php
namespace Symfony\Config\Doctrine\Orm\EntityManagerConfig;
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 ResultCacheDriverConfig
{
private $type;
private $id;
private $pool;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function type($value): static
{
$this->_usedProperties['type'] = true;
$this->type = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function id($value): static
{
$this->_usedProperties['id'] = true;
$this->id = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function pool($value): static
{
$this->_usedProperties['pool'] = true;
$this->pool = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('type', $value)) {
$this->_usedProperties['type'] = true;
$this->type = $value['type'];
unset($value['type']);
}
if (array_key_exists('id', $value)) {
$this->_usedProperties['id'] = true;
$this->id = $value['id'];
unset($value['id']);
}
if (array_key_exists('pool', $value)) {
$this->_usedProperties['pool'] = true;
$this->pool = $value['pool'];
unset($value['pool']);
}
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 (isset($this->_usedProperties['type'])) {
$output['type'] = $this->type;
}
if (isset($this->_usedProperties['id'])) {
$output['id'] = $this->id;
}
if (isset($this->_usedProperties['pool'])) {
$output['pool'] = $this->pool;
}
return $output;
}
}

View File

@@ -0,0 +1,75 @@
<?php
namespace Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache;
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 LoggerConfig
{
private $name;
private $service;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function name($value): static
{
$this->_usedProperties['name'] = true;
$this->name = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function service($value): static
{
$this->_usedProperties['service'] = true;
$this->service = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('name', $value)) {
$this->_usedProperties['name'] = true;
$this->name = $value['name'];
unset($value['name']);
}
if (array_key_exists('service', $value)) {
$this->_usedProperties['service'] = true;
$this->service = $value['service'];
unset($value['service']);
}
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 (isset($this->_usedProperties['name'])) {
$output['name'] = $this->name;
}
if (isset($this->_usedProperties['service'])) {
$output['service'] = $this->service;
}
return $output;
}
}

View File

@@ -0,0 +1,98 @@
<?php
namespace Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache;
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 RegionCacheDriverConfig
{
private $type;
private $id;
private $pool;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function type($value): static
{
$this->_usedProperties['type'] = true;
$this->type = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function id($value): static
{
$this->_usedProperties['id'] = true;
$this->id = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function pool($value): static
{
$this->_usedProperties['pool'] = true;
$this->pool = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('type', $value)) {
$this->_usedProperties['type'] = true;
$this->type = $value['type'];
unset($value['type']);
}
if (array_key_exists('id', $value)) {
$this->_usedProperties['id'] = true;
$this->id = $value['id'];
unset($value['id']);
}
if (array_key_exists('pool', $value)) {
$this->_usedProperties['pool'] = true;
$this->pool = $value['pool'];
unset($value['pool']);
}
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 (isset($this->_usedProperties['type'])) {
$output['type'] = $this->type;
}
if (isset($this->_usedProperties['id'])) {
$output['id'] = $this->id;
}
if (isset($this->_usedProperties['pool'])) {
$output['pool'] = $this->pool;
}
return $output;
}
}

View File

@@ -0,0 +1,205 @@
<?php
namespace Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache;
require_once __DIR__.\DIRECTORY_SEPARATOR.'RegionConfig'.\DIRECTORY_SEPARATOR.'CacheDriverConfig.php';
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
use Symfony\Component\Config\Loader\ParamConfigurator;
/**
* This class is automatically generated to help in creating a config.
*/
class RegionConfig
{
private $cacheDriver;
private $lockPath;
private $lockLifetime;
private $type;
private $lifetime;
private $service;
private $name;
private $_usedProperties = [];
/**
* @template TValue of string|array
* @param TValue $value
* @default {"type":null}
* @return \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig\CacheDriverConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig\CacheDriverConfig : static)
*/
public function cacheDriver(string|array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig\CacheDriverConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['cacheDriver'] = true;
$this->cacheDriver = $value;
return $this;
}
if (!$this->cacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig\CacheDriverConfig) {
$this->_usedProperties['cacheDriver'] = true;
$this->cacheDriver = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig\CacheDriverConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "cacheDriver()" has already been initialized. You cannot pass values the second time you call cacheDriver().');
}
return $this->cacheDriver;
}
/**
* @default '%kernel.cache_dir%/doctrine/orm/slc/filelock'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function lockPath($value): static
{
$this->_usedProperties['lockPath'] = true;
$this->lockPath = $value;
return $this;
}
/**
* @default 60
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function lockLifetime($value): static
{
$this->_usedProperties['lockLifetime'] = true;
$this->lockLifetime = $value;
return $this;
}
/**
* @default 'default'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function type($value): static
{
$this->_usedProperties['type'] = true;
$this->type = $value;
return $this;
}
/**
* @default 0
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function lifetime($value): static
{
$this->_usedProperties['lifetime'] = true;
$this->lifetime = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function service($value): static
{
$this->_usedProperties['service'] = true;
$this->service = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function name($value): static
{
$this->_usedProperties['name'] = true;
$this->name = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('cache_driver', $value)) {
$this->_usedProperties['cacheDriver'] = true;
$this->cacheDriver = \is_array($value['cache_driver']) ? new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig\CacheDriverConfig($value['cache_driver']) : $value['cache_driver'];
unset($value['cache_driver']);
}
if (array_key_exists('lock_path', $value)) {
$this->_usedProperties['lockPath'] = true;
$this->lockPath = $value['lock_path'];
unset($value['lock_path']);
}
if (array_key_exists('lock_lifetime', $value)) {
$this->_usedProperties['lockLifetime'] = true;
$this->lockLifetime = $value['lock_lifetime'];
unset($value['lock_lifetime']);
}
if (array_key_exists('type', $value)) {
$this->_usedProperties['type'] = true;
$this->type = $value['type'];
unset($value['type']);
}
if (array_key_exists('lifetime', $value)) {
$this->_usedProperties['lifetime'] = true;
$this->lifetime = $value['lifetime'];
unset($value['lifetime']);
}
if (array_key_exists('service', $value)) {
$this->_usedProperties['service'] = true;
$this->service = $value['service'];
unset($value['service']);
}
if (array_key_exists('name', $value)) {
$this->_usedProperties['name'] = true;
$this->name = $value['name'];
unset($value['name']);
}
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 (isset($this->_usedProperties['cacheDriver'])) {
$output['cache_driver'] = $this->cacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig\CacheDriverConfig ? $this->cacheDriver->toArray() : $this->cacheDriver;
}
if (isset($this->_usedProperties['lockPath'])) {
$output['lock_path'] = $this->lockPath;
}
if (isset($this->_usedProperties['lockLifetime'])) {
$output['lock_lifetime'] = $this->lockLifetime;
}
if (isset($this->_usedProperties['type'])) {
$output['type'] = $this->type;
}
if (isset($this->_usedProperties['lifetime'])) {
$output['lifetime'] = $this->lifetime;
}
if (isset($this->_usedProperties['service'])) {
$output['service'] = $this->service;
}
if (isset($this->_usedProperties['name'])) {
$output['name'] = $this->name;
}
return $output;
}
}

View File

@@ -0,0 +1,98 @@
<?php
namespace Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig;
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 CacheDriverConfig
{
private $type;
private $id;
private $pool;
private $_usedProperties = [];
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function type($value): static
{
$this->_usedProperties['type'] = true;
$this->type = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function id($value): static
{
$this->_usedProperties['id'] = true;
$this->id = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function pool($value): static
{
$this->_usedProperties['pool'] = true;
$this->pool = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('type', $value)) {
$this->_usedProperties['type'] = true;
$this->type = $value['type'];
unset($value['type']);
}
if (array_key_exists('id', $value)) {
$this->_usedProperties['id'] = true;
$this->id = $value['id'];
unset($value['id']);
}
if (array_key_exists('pool', $value)) {
$this->_usedProperties['pool'] = true;
$this->pool = $value['pool'];
unset($value['pool']);
}
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 (isset($this->_usedProperties['type'])) {
$output['type'] = $this->type;
}
if (isset($this->_usedProperties['id'])) {
$output['id'] = $this->id;
}
if (isset($this->_usedProperties['pool'])) {
$output['pool'] = $this->pool;
}
return $output;
}
}

View File

@@ -0,0 +1,228 @@
<?php
namespace Symfony\Config\Doctrine\Orm\EntityManagerConfig;
require_once __DIR__.\DIRECTORY_SEPARATOR.'SecondLevelCache'.\DIRECTORY_SEPARATOR.'RegionCacheDriverConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'SecondLevelCache'.\DIRECTORY_SEPARATOR.'RegionConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'SecondLevelCache'.\DIRECTORY_SEPARATOR.'LoggerConfig.php';
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
use Symfony\Component\Config\Loader\ParamConfigurator;
/**
* This class is automatically generated to help in creating a config.
*/
class SecondLevelCacheConfig
{
private $regionCacheDriver;
private $regionLockLifetime;
private $logEnabled;
private $regionLifetime;
private $enabled;
private $factory;
private $regions;
private $loggers;
private $_usedProperties = [];
/**
* @template TValue of string|array
* @param TValue $value
* @default {"type":null}
* @return \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionCacheDriverConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionCacheDriverConfig : static)
*/
public function regionCacheDriver(string|array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionCacheDriverConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['regionCacheDriver'] = true;
$this->regionCacheDriver = $value;
return $this;
}
if (!$this->regionCacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionCacheDriverConfig) {
$this->_usedProperties['regionCacheDriver'] = true;
$this->regionCacheDriver = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionCacheDriverConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "regionCacheDriver()" has already been initialized. You cannot pass values the second time you call regionCacheDriver().');
}
return $this->regionCacheDriver;
}
/**
* @default 60
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function regionLockLifetime($value): static
{
$this->_usedProperties['regionLockLifetime'] = true;
$this->regionLockLifetime = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function logEnabled($value): static
{
$this->_usedProperties['logEnabled'] = true;
$this->logEnabled = $value;
return $this;
}
/**
* @default 3600
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function regionLifetime($value): static
{
$this->_usedProperties['regionLifetime'] = true;
$this->regionLifetime = $value;
return $this;
}
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enabled($value): static
{
$this->_usedProperties['enabled'] = true;
$this->enabled = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function factory($value): static
{
$this->_usedProperties['factory'] = true;
$this->factory = $value;
return $this;
}
public function region(string $name, array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig
{
if (!isset($this->regions[$name])) {
$this->_usedProperties['regions'] = true;
$this->regions[$name] = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig($value);
} elseif (1 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "region()" has already been initialized. You cannot pass values the second time you call region().');
}
return $this->regions[$name];
}
public function logger(string $name, array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\LoggerConfig
{
if (!isset($this->loggers[$name])) {
$this->_usedProperties['loggers'] = true;
$this->loggers[$name] = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\LoggerConfig($value);
} elseif (1 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "logger()" has already been initialized. You cannot pass values the second time you call logger().');
}
return $this->loggers[$name];
}
public function __construct(array $value = [])
{
if (array_key_exists('region_cache_driver', $value)) {
$this->_usedProperties['regionCacheDriver'] = true;
$this->regionCacheDriver = \is_array($value['region_cache_driver']) ? new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionCacheDriverConfig($value['region_cache_driver']) : $value['region_cache_driver'];
unset($value['region_cache_driver']);
}
if (array_key_exists('region_lock_lifetime', $value)) {
$this->_usedProperties['regionLockLifetime'] = true;
$this->regionLockLifetime = $value['region_lock_lifetime'];
unset($value['region_lock_lifetime']);
}
if (array_key_exists('log_enabled', $value)) {
$this->_usedProperties['logEnabled'] = true;
$this->logEnabled = $value['log_enabled'];
unset($value['log_enabled']);
}
if (array_key_exists('region_lifetime', $value)) {
$this->_usedProperties['regionLifetime'] = true;
$this->regionLifetime = $value['region_lifetime'];
unset($value['region_lifetime']);
}
if (array_key_exists('enabled', $value)) {
$this->_usedProperties['enabled'] = true;
$this->enabled = $value['enabled'];
unset($value['enabled']);
}
if (array_key_exists('factory', $value)) {
$this->_usedProperties['factory'] = true;
$this->factory = $value['factory'];
unset($value['factory']);
}
if (array_key_exists('regions', $value)) {
$this->_usedProperties['regions'] = true;
$this->regions = array_map(fn ($v) => new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionConfig($v), $value['regions']);
unset($value['regions']);
}
if (array_key_exists('loggers', $value)) {
$this->_usedProperties['loggers'] = true;
$this->loggers = array_map(fn ($v) => new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\LoggerConfig($v), $value['loggers']);
unset($value['loggers']);
}
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 (isset($this->_usedProperties['regionCacheDriver'])) {
$output['region_cache_driver'] = $this->regionCacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCache\RegionCacheDriverConfig ? $this->regionCacheDriver->toArray() : $this->regionCacheDriver;
}
if (isset($this->_usedProperties['regionLockLifetime'])) {
$output['region_lock_lifetime'] = $this->regionLockLifetime;
}
if (isset($this->_usedProperties['logEnabled'])) {
$output['log_enabled'] = $this->logEnabled;
}
if (isset($this->_usedProperties['regionLifetime'])) {
$output['region_lifetime'] = $this->regionLifetime;
}
if (isset($this->_usedProperties['enabled'])) {
$output['enabled'] = $this->enabled;
}
if (isset($this->_usedProperties['factory'])) {
$output['factory'] = $this->factory;
}
if (isset($this->_usedProperties['regions'])) {
$output['regions'] = array_map(fn ($v) => $v->toArray(), $this->regions);
}
if (isset($this->_usedProperties['loggers'])) {
$output['loggers'] = array_map(fn ($v) => $v->toArray(), $this->loggers);
}
return $output;
}
}