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,100 @@
<?php
namespace Symfony\Config\Doctrine\Orm;
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 ControllerResolverConfig
{
private $enabled;
private $autoMapping;
private $evictCache;
private $_usedProperties = [];
/**
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function enabled($value): static
{
$this->_usedProperties['enabled'] = true;
$this->enabled = $value;
return $this;
}
/**
* Set to false to disable using route placeholders as lookup criteria when the primary key doesn't match the argument name
* @default null
* @param ParamConfigurator|bool $value
* @return $this
*/
public function autoMapping($value): static
{
$this->_usedProperties['autoMapping'] = true;
$this->autoMapping = $value;
return $this;
}
/**
* Set to true to fetch the entity from the database instead of using the cache, if any
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function evictCache($value): static
{
$this->_usedProperties['evictCache'] = true;
$this->evictCache = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('enabled', $value)) {
$this->_usedProperties['enabled'] = true;
$this->enabled = $value['enabled'];
unset($value['enabled']);
}
if (array_key_exists('auto_mapping', $value)) {
$this->_usedProperties['autoMapping'] = true;
$this->autoMapping = $value['auto_mapping'];
unset($value['auto_mapping']);
}
if (array_key_exists('evict_cache', $value)) {
$this->_usedProperties['evictCache'] = true;
$this->evictCache = $value['evict_cache'];
unset($value['evict_cache']);
}
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['enabled'])) {
$output['enabled'] = $this->enabled;
}
if (isset($this->_usedProperties['autoMapping'])) {
$output['auto_mapping'] = $this->autoMapping;
}
if (isset($this->_usedProperties['evictCache'])) {
$output['evict_cache'] = $this->evictCache;
}
return $output;
}
}

View File

@@ -0,0 +1,638 @@
<?php
namespace Symfony\Config\Doctrine\Orm;
require_once __DIR__.\DIRECTORY_SEPARATOR.'EntityManagerConfig'.\DIRECTORY_SEPARATOR.'QueryCacheDriverConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'EntityManagerConfig'.\DIRECTORY_SEPARATOR.'MetadataCacheDriverConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'EntityManagerConfig'.\DIRECTORY_SEPARATOR.'ResultCacheDriverConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'EntityManagerConfig'.\DIRECTORY_SEPARATOR.'EntityListenersConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'EntityManagerConfig'.\DIRECTORY_SEPARATOR.'SecondLevelCacheConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'EntityManagerConfig'.\DIRECTORY_SEPARATOR.'MappingConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'EntityManagerConfig'.\DIRECTORY_SEPARATOR.'DqlConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'EntityManagerConfig'.\DIRECTORY_SEPARATOR.'FilterConfig.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 EntityManagerConfig
{
private $queryCacheDriver;
private $metadataCacheDriver;
private $resultCacheDriver;
private $entityListeners;
private $connection;
private $classMetadataFactoryName;
private $defaultRepositoryClass;
private $autoMapping;
private $namingStrategy;
private $quoteStrategy;
private $typedFieldMapper;
private $entityListenerResolver;
private $fetchModeSubselectBatchSize;
private $repositoryFactory;
private $schemaIgnoreClasses;
private $reportFieldsWhereDeclared;
private $validateXmlMapping;
private $secondLevelCache;
private $hydrators;
private $mappings;
private $dql;
private $filters;
private $identityGenerationPreferences;
private $_usedProperties = [];
/**
* @template TValue of string|array
* @param TValue $value
* @default {"type":null}
* @return \Symfony\Config\Doctrine\Orm\EntityManagerConfig\QueryCacheDriverConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Orm\EntityManagerConfig\QueryCacheDriverConfig : static)
*/
public function queryCacheDriver(string|array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\QueryCacheDriverConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['queryCacheDriver'] = true;
$this->queryCacheDriver = $value;
return $this;
}
if (!$this->queryCacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\QueryCacheDriverConfig) {
$this->_usedProperties['queryCacheDriver'] = true;
$this->queryCacheDriver = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\QueryCacheDriverConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "queryCacheDriver()" has already been initialized. You cannot pass values the second time you call queryCacheDriver().');
}
return $this->queryCacheDriver;
}
/**
* @template TValue of string|array
* @param TValue $value
* @return \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MetadataCacheDriverConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MetadataCacheDriverConfig : static)
*/
public function metadataCacheDriver(string|array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MetadataCacheDriverConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['metadataCacheDriver'] = true;
$this->metadataCacheDriver = $value;
return $this;
}
if (!$this->metadataCacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MetadataCacheDriverConfig) {
$this->_usedProperties['metadataCacheDriver'] = true;
$this->metadataCacheDriver = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MetadataCacheDriverConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "metadataCacheDriver()" has already been initialized. You cannot pass values the second time you call metadataCacheDriver().');
}
return $this->metadataCacheDriver;
}
/**
* @template TValue of string|array
* @param TValue $value
* @default {"type":null}
* @return \Symfony\Config\Doctrine\Orm\EntityManagerConfig\ResultCacheDriverConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Orm\EntityManagerConfig\ResultCacheDriverConfig : static)
*/
public function resultCacheDriver(string|array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\ResultCacheDriverConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['resultCacheDriver'] = true;
$this->resultCacheDriver = $value;
return $this;
}
if (!$this->resultCacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\ResultCacheDriverConfig) {
$this->_usedProperties['resultCacheDriver'] = true;
$this->resultCacheDriver = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\ResultCacheDriverConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "resultCacheDriver()" has already been initialized. You cannot pass values the second time you call resultCacheDriver().');
}
return $this->resultCacheDriver;
}
/**
* @template TValue of mixed
* @param TValue $value
* @return \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListenersConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListenersConfig : static)
*/
public function entityListeners(mixed $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListenersConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['entityListeners'] = true;
$this->entityListeners = $value;
return $this;
}
if (!$this->entityListeners instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListenersConfig) {
$this->_usedProperties['entityListeners'] = true;
$this->entityListeners = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListenersConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "entityListeners()" has already been initialized. You cannot pass values the second time you call entityListeners().');
}
return $this->entityListeners;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function connection($value): static
{
$this->_usedProperties['connection'] = true;
$this->connection = $value;
return $this;
}
/**
* @default 'Doctrine\\ORM\\Mapping\\ClassMetadataFactory'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function classMetadataFactoryName($value): static
{
$this->_usedProperties['classMetadataFactoryName'] = true;
$this->classMetadataFactoryName = $value;
return $this;
}
/**
* @default 'Doctrine\\ORM\\EntityRepository'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function defaultRepositoryClass($value): static
{
$this->_usedProperties['defaultRepositoryClass'] = true;
$this->defaultRepositoryClass = $value;
return $this;
}
/**
* @default false
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function autoMapping($value): static
{
$this->_usedProperties['autoMapping'] = true;
$this->autoMapping = $value;
return $this;
}
/**
* @default 'doctrine.orm.naming_strategy.default'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function namingStrategy($value): static
{
$this->_usedProperties['namingStrategy'] = true;
$this->namingStrategy = $value;
return $this;
}
/**
* @default 'doctrine.orm.quote_strategy.default'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function quoteStrategy($value): static
{
$this->_usedProperties['quoteStrategy'] = true;
$this->quoteStrategy = $value;
return $this;
}
/**
* @default 'doctrine.orm.typed_field_mapper.default'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function typedFieldMapper($value): static
{
$this->_usedProperties['typedFieldMapper'] = true;
$this->typedFieldMapper = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function entityListenerResolver($value): static
{
$this->_usedProperties['entityListenerResolver'] = true;
$this->entityListenerResolver = $value;
return $this;
}
/**
* @default null
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function fetchModeSubselectBatchSize($value): static
{
$this->_usedProperties['fetchModeSubselectBatchSize'] = true;
$this->fetchModeSubselectBatchSize = $value;
return $this;
}
/**
* @default 'doctrine.orm.container_repository_factory'
* @param ParamConfigurator|mixed $value
* @return $this
*/
public function repositoryFactory($value): static
{
$this->_usedProperties['repositoryFactory'] = true;
$this->repositoryFactory = $value;
return $this;
}
/**
* @param ParamConfigurator|list<ParamConfigurator|mixed> $value
*
* @return $this
*/
public function schemaIgnoreClasses(ParamConfigurator|array $value): static
{
$this->_usedProperties['schemaIgnoreClasses'] = true;
$this->schemaIgnoreClasses = $value;
return $this;
}
/**
* Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.16 and will be mandatory in ORM 3.0. See https://github.com/doctrine/orm/pull/10455.
* @default true
* @param ParamConfigurator|bool $value
* @return $this
*/
public function reportFieldsWhereDeclared($value): static
{
$this->_usedProperties['reportFieldsWhereDeclared'] = true;
$this->reportFieldsWhereDeclared = $value;
return $this;
}
/**
* Set to "true" to opt-in to the new mapping driver mode that was added in Doctrine ORM 2.14 and will be mandatory in ORM 3.0. See https://github.com/doctrine/orm/pull/6728.
* @default false
* @param ParamConfigurator|bool $value
* @return $this
*/
public function validateXmlMapping($value): static
{
$this->_usedProperties['validateXmlMapping'] = true;
$this->validateXmlMapping = $value;
return $this;
}
public function secondLevelCache(array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCacheConfig
{
if (null === $this->secondLevelCache) {
$this->_usedProperties['secondLevelCache'] = true;
$this->secondLevelCache = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCacheConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "secondLevelCache()" has already been initialized. You cannot pass values the second time you call secondLevelCache().');
}
return $this->secondLevelCache;
}
/**
* @return $this
*/
public function hydrator(string $name, mixed $value): static
{
$this->_usedProperties['hydrators'] = true;
$this->hydrators[$name] = $value;
return $this;
}
/**
* @template TValue of string|array
* @param TValue $value
* @return \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MappingConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MappingConfig : static)
*/
public function mapping(string $name, string|array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MappingConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['mappings'] = true;
$this->mappings[$name] = $value;
return $this;
}
if (!isset($this->mappings[$name]) || !$this->mappings[$name] instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MappingConfig) {
$this->_usedProperties['mappings'] = true;
$this->mappings[$name] = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MappingConfig($value);
} elseif (1 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "mapping()" has already been initialized. You cannot pass values the second time you call mapping().');
}
return $this->mappings[$name];
}
public function dql(array $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\DqlConfig
{
if (null === $this->dql) {
$this->_usedProperties['dql'] = true;
$this->dql = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\DqlConfig($value);
} elseif (0 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "dql()" has already been initialized. You cannot pass values the second time you call dql().');
}
return $this->dql;
}
/**
* @template TValue of mixed
* @param TValue $value
* Register SQL Filters in the entity manager
* @return \Symfony\Config\Doctrine\Orm\EntityManagerConfig\FilterConfig|$this
* @psalm-return (TValue is array ? \Symfony\Config\Doctrine\Orm\EntityManagerConfig\FilterConfig : static)
*/
public function filter(string $name, mixed $value = []): \Symfony\Config\Doctrine\Orm\EntityManagerConfig\FilterConfig|static
{
if (!\is_array($value)) {
$this->_usedProperties['filters'] = true;
$this->filters[$name] = $value;
return $this;
}
if (!isset($this->filters[$name]) || !$this->filters[$name] instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\FilterConfig) {
$this->_usedProperties['filters'] = true;
$this->filters[$name] = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\FilterConfig($value);
} elseif (1 < \func_num_args()) {
throw new InvalidConfigurationException('The node created by "filter()" has already been initialized. You cannot pass values the second time you call filter().');
}
return $this->filters[$name];
}
/**
* @return $this
*/
public function identityGenerationPreference(string $platform, mixed $value): static
{
$this->_usedProperties['identityGenerationPreferences'] = true;
$this->identityGenerationPreferences[$platform] = $value;
return $this;
}
public function __construct(array $value = [])
{
if (array_key_exists('query_cache_driver', $value)) {
$this->_usedProperties['queryCacheDriver'] = true;
$this->queryCacheDriver = \is_array($value['query_cache_driver']) ? new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\QueryCacheDriverConfig($value['query_cache_driver']) : $value['query_cache_driver'];
unset($value['query_cache_driver']);
}
if (array_key_exists('metadata_cache_driver', $value)) {
$this->_usedProperties['metadataCacheDriver'] = true;
$this->metadataCacheDriver = \is_array($value['metadata_cache_driver']) ? new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MetadataCacheDriverConfig($value['metadata_cache_driver']) : $value['metadata_cache_driver'];
unset($value['metadata_cache_driver']);
}
if (array_key_exists('result_cache_driver', $value)) {
$this->_usedProperties['resultCacheDriver'] = true;
$this->resultCacheDriver = \is_array($value['result_cache_driver']) ? new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\ResultCacheDriverConfig($value['result_cache_driver']) : $value['result_cache_driver'];
unset($value['result_cache_driver']);
}
if (array_key_exists('entity_listeners', $value)) {
$this->_usedProperties['entityListeners'] = true;
$this->entityListeners = \is_array($value['entity_listeners']) ? new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListenersConfig($value['entity_listeners']) : $value['entity_listeners'];
unset($value['entity_listeners']);
}
if (array_key_exists('connection', $value)) {
$this->_usedProperties['connection'] = true;
$this->connection = $value['connection'];
unset($value['connection']);
}
if (array_key_exists('class_metadata_factory_name', $value)) {
$this->_usedProperties['classMetadataFactoryName'] = true;
$this->classMetadataFactoryName = $value['class_metadata_factory_name'];
unset($value['class_metadata_factory_name']);
}
if (array_key_exists('default_repository_class', $value)) {
$this->_usedProperties['defaultRepositoryClass'] = true;
$this->defaultRepositoryClass = $value['default_repository_class'];
unset($value['default_repository_class']);
}
if (array_key_exists('auto_mapping', $value)) {
$this->_usedProperties['autoMapping'] = true;
$this->autoMapping = $value['auto_mapping'];
unset($value['auto_mapping']);
}
if (array_key_exists('naming_strategy', $value)) {
$this->_usedProperties['namingStrategy'] = true;
$this->namingStrategy = $value['naming_strategy'];
unset($value['naming_strategy']);
}
if (array_key_exists('quote_strategy', $value)) {
$this->_usedProperties['quoteStrategy'] = true;
$this->quoteStrategy = $value['quote_strategy'];
unset($value['quote_strategy']);
}
if (array_key_exists('typed_field_mapper', $value)) {
$this->_usedProperties['typedFieldMapper'] = true;
$this->typedFieldMapper = $value['typed_field_mapper'];
unset($value['typed_field_mapper']);
}
if (array_key_exists('entity_listener_resolver', $value)) {
$this->_usedProperties['entityListenerResolver'] = true;
$this->entityListenerResolver = $value['entity_listener_resolver'];
unset($value['entity_listener_resolver']);
}
if (array_key_exists('fetch_mode_subselect_batch_size', $value)) {
$this->_usedProperties['fetchModeSubselectBatchSize'] = true;
$this->fetchModeSubselectBatchSize = $value['fetch_mode_subselect_batch_size'];
unset($value['fetch_mode_subselect_batch_size']);
}
if (array_key_exists('repository_factory', $value)) {
$this->_usedProperties['repositoryFactory'] = true;
$this->repositoryFactory = $value['repository_factory'];
unset($value['repository_factory']);
}
if (array_key_exists('schema_ignore_classes', $value)) {
$this->_usedProperties['schemaIgnoreClasses'] = true;
$this->schemaIgnoreClasses = $value['schema_ignore_classes'];
unset($value['schema_ignore_classes']);
}
if (array_key_exists('report_fields_where_declared', $value)) {
$this->_usedProperties['reportFieldsWhereDeclared'] = true;
$this->reportFieldsWhereDeclared = $value['report_fields_where_declared'];
unset($value['report_fields_where_declared']);
}
if (array_key_exists('validate_xml_mapping', $value)) {
$this->_usedProperties['validateXmlMapping'] = true;
$this->validateXmlMapping = $value['validate_xml_mapping'];
unset($value['validate_xml_mapping']);
}
if (array_key_exists('second_level_cache', $value)) {
$this->_usedProperties['secondLevelCache'] = true;
$this->secondLevelCache = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\SecondLevelCacheConfig($value['second_level_cache']);
unset($value['second_level_cache']);
}
if (array_key_exists('hydrators', $value)) {
$this->_usedProperties['hydrators'] = true;
$this->hydrators = $value['hydrators'];
unset($value['hydrators']);
}
if (array_key_exists('mappings', $value)) {
$this->_usedProperties['mappings'] = true;
$this->mappings = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MappingConfig($v) : $v, $value['mappings']);
unset($value['mappings']);
}
if (array_key_exists('dql', $value)) {
$this->_usedProperties['dql'] = true;
$this->dql = new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\DqlConfig($value['dql']);
unset($value['dql']);
}
if (array_key_exists('filters', $value)) {
$this->_usedProperties['filters'] = true;
$this->filters = array_map(fn ($v) => \is_array($v) ? new \Symfony\Config\Doctrine\Orm\EntityManagerConfig\FilterConfig($v) : $v, $value['filters']);
unset($value['filters']);
}
if (array_key_exists('identity_generation_preferences', $value)) {
$this->_usedProperties['identityGenerationPreferences'] = true;
$this->identityGenerationPreferences = $value['identity_generation_preferences'];
unset($value['identity_generation_preferences']);
}
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['queryCacheDriver'])) {
$output['query_cache_driver'] = $this->queryCacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\QueryCacheDriverConfig ? $this->queryCacheDriver->toArray() : $this->queryCacheDriver;
}
if (isset($this->_usedProperties['metadataCacheDriver'])) {
$output['metadata_cache_driver'] = $this->metadataCacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MetadataCacheDriverConfig ? $this->metadataCacheDriver->toArray() : $this->metadataCacheDriver;
}
if (isset($this->_usedProperties['resultCacheDriver'])) {
$output['result_cache_driver'] = $this->resultCacheDriver instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\ResultCacheDriverConfig ? $this->resultCacheDriver->toArray() : $this->resultCacheDriver;
}
if (isset($this->_usedProperties['entityListeners'])) {
$output['entity_listeners'] = $this->entityListeners instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\EntityListenersConfig ? $this->entityListeners->toArray() : $this->entityListeners;
}
if (isset($this->_usedProperties['connection'])) {
$output['connection'] = $this->connection;
}
if (isset($this->_usedProperties['classMetadataFactoryName'])) {
$output['class_metadata_factory_name'] = $this->classMetadataFactoryName;
}
if (isset($this->_usedProperties['defaultRepositoryClass'])) {
$output['default_repository_class'] = $this->defaultRepositoryClass;
}
if (isset($this->_usedProperties['autoMapping'])) {
$output['auto_mapping'] = $this->autoMapping;
}
if (isset($this->_usedProperties['namingStrategy'])) {
$output['naming_strategy'] = $this->namingStrategy;
}
if (isset($this->_usedProperties['quoteStrategy'])) {
$output['quote_strategy'] = $this->quoteStrategy;
}
if (isset($this->_usedProperties['typedFieldMapper'])) {
$output['typed_field_mapper'] = $this->typedFieldMapper;
}
if (isset($this->_usedProperties['entityListenerResolver'])) {
$output['entity_listener_resolver'] = $this->entityListenerResolver;
}
if (isset($this->_usedProperties['fetchModeSubselectBatchSize'])) {
$output['fetch_mode_subselect_batch_size'] = $this->fetchModeSubselectBatchSize;
}
if (isset($this->_usedProperties['repositoryFactory'])) {
$output['repository_factory'] = $this->repositoryFactory;
}
if (isset($this->_usedProperties['schemaIgnoreClasses'])) {
$output['schema_ignore_classes'] = $this->schemaIgnoreClasses;
}
if (isset($this->_usedProperties['reportFieldsWhereDeclared'])) {
$output['report_fields_where_declared'] = $this->reportFieldsWhereDeclared;
}
if (isset($this->_usedProperties['validateXmlMapping'])) {
$output['validate_xml_mapping'] = $this->validateXmlMapping;
}
if (isset($this->_usedProperties['secondLevelCache'])) {
$output['second_level_cache'] = $this->secondLevelCache->toArray();
}
if (isset($this->_usedProperties['hydrators'])) {
$output['hydrators'] = $this->hydrators;
}
if (isset($this->_usedProperties['mappings'])) {
$output['mappings'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\MappingConfig ? $v->toArray() : $v, $this->mappings);
}
if (isset($this->_usedProperties['dql'])) {
$output['dql'] = $this->dql->toArray();
}
if (isset($this->_usedProperties['filters'])) {
$output['filters'] = array_map(fn ($v) => $v instanceof \Symfony\Config\Doctrine\Orm\EntityManagerConfig\FilterConfig ? $v->toArray() : $v, $this->filters);
}
if (isset($this->_usedProperties['identityGenerationPreferences'])) {
$output['identity_generation_preferences'] = $this->identityGenerationPreferences;
}
return $output;
}
}

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;
}
}