| Methods |
public
|
setProxyDir(string $dir): void
Sets the directory where Doctrine generates any necessary proxy class files.
Sets the directory where Doctrine generates any necessary proxy class files.
|
#
|
public
|
getProxyDir(): string|null
Gets the directory where Doctrine generates any necessary proxy class files.
Gets the directory where Doctrine generates any necessary proxy class files.
|
#
|
public
|
getAutoGenerateProxyClasses(): ProxyFactory::AUTOGENERATE_*
Gets the strategy for automatically generating proxy classes.
Gets the strategy for automatically generating proxy classes.
|
#
|
public
|
setAutoGenerateProxyClasses(bool|ProxyFactory::AUTOGENERATE_* $autoGenerate): void
Sets the strategy for automatically generating proxy classes.
Sets the strategy for automatically generating proxy classes.
Parameters
| $autoGenerate |
True is converted to AUTOGENERATE_ALWAYS, false to AUTOGENERATE_NEVER.
|
|
#
|
public
|
getProxyNamespace(): string|null
Gets the namespace where proxy classes reside.
Gets the namespace where proxy classes reside.
|
#
|
public
|
setProxyNamespace(string $ns): void
Sets the namespace where proxy classes reside.
Sets the namespace where proxy classes reside.
|
#
|
public
|
setMetadataDriverImpl(MappingDriver $driverImpl): void
Sets the cache driver implementation that is used for metadata caching.
Sets the cache driver implementation that is used for metadata caching.
|
#
|
public
|
newDefaultAnnotationDriver(
string|list<string> $paths = [],
bool $useSimpleAnnotationReader = true,
bool $reportFieldsWhereDeclared = false,
): AnnotationDriver
Adds a new default annotation driver with a correctly configured annotation reader. If $useSimpleAnnotationReader
is…
Adds a new default annotation driver with a correctly configured annotation reader. If $useSimpleAnnotationReader
is true, the notation @Entity will work, otherwise, the notation @ORM\Entity will be supported.
Deprecated
Use {@see ORMSetup::createDefaultAnnotationDriver()} instead.
|
#
|
public
|
addEntityNamespace(string $alias, string $namespace): void
Adds a namespace under a certain alias.
Adds a namespace under a certain alias.
Deprecated
|
#
|
public
|
getEntityNamespace(string $entityNamespaceAlias): string
Resolves a registered namespace alias to the full namespace.
Resolves a registered namespace alias to the full namespace.
Throws
|
#
|
public
|
setEntityNamespaces(array<string, string> $entityNamespaces): void
Sets the entity alias map.
Sets the entity alias map.
|
#
|
public
|
getEntityNamespaces()
Retrieves the list of registered entity namespace aliases.
Retrieves the list of registered entity namespace aliases.
|
#
|
public
|
getMetadataDriverImpl(): MappingDriver|null
Gets the cache driver implementation that is used for the mapping metadata.
Gets the cache driver implementation that is used for the mapping metadata.
|
#
|
public
|
getResultCache(): ?CacheItemPoolInterface
Gets the cache driver implementation that is used for query result caching.
Gets the cache driver implementation that is used for query result caching.
Overrides
|
#
|
public
|
setResultCache(CacheItemPoolInterface $cache): void
Sets the cache driver implementation that is used for query result caching.
Sets the cache driver implementation that is used for query result caching.
Overrides
|
#
|
public
|
getQueryCacheImpl(): Cache|null
Gets the cache driver implementation that is used for the query cache (SQL cache).
Gets the cache driver implementation that is used for the query cache (SQL cache).
Deprecated
Call {@see getQueryCache()} instead.
|
#
|
public
|
setQueryCacheImpl(Cache $cacheImpl): void
Sets the cache driver implementation that is used for the query cache (SQL cache).
Sets the cache driver implementation that is used for the query cache (SQL cache).
Deprecated
Call {@see setQueryCache()} instead.
|
#
|
public
|
getQueryCache(): ?CacheItemPoolInterface
Gets the cache driver implementation that is used for the query cache (SQL cache).
Gets the cache driver implementation that is used for the query cache (SQL cache).
|
#
|
public
|
setQueryCache(CacheItemPoolInterface $cache): void
Sets the cache driver implementation that is used for the query cache (SQL cache).
Sets the cache driver implementation that is used for the query cache (SQL cache).
|
#
|
public
|
getHydrationCacheImpl(): Cache|null
Gets the cache driver implementation that is used for the hydration cache (SQL cache).
Gets the cache driver implementation that is used for the hydration cache (SQL cache).
Deprecated
Call {@see getHydrationCache()} instead.
|
#
|
public
|
setHydrationCacheImpl(Cache $cacheImpl): void
Sets the cache driver implementation that is used for the hydration cache (SQL cache).
Sets the cache driver implementation that is used for the hydration cache (SQL cache).
Deprecated
Call {@see setHydrationCache()} instead.
|
#
|
public
|
getHydrationCache(): ?CacheItemPoolInterface
|
#
|
public
|
setHydrationCache(CacheItemPoolInterface $cache): void
|
#
|
public
|
getMetadataCacheImpl(): Cache|null
Gets the cache driver implementation that is used for metadata caching.
Gets the cache driver implementation that is used for metadata caching.
Deprecated
Deprecated in favor of getMetadataCache
|
#
|
public
|
setMetadataCacheImpl(Cache $cacheImpl): void
Sets the cache driver implementation that is used for metadata caching.
Sets the cache driver implementation that is used for metadata caching.
Deprecated
Deprecated in favor of setMetadataCache
|
#
|
public
|
getMetadataCache(): ?CacheItemPoolInterface
|
#
|
public
|
setMetadataCache(CacheItemPoolInterface $cache): void
|
#
|
public
|
addNamedQuery(string $name, string $dql): void
Adds a named DQL query to the configuration.
Adds a named DQL query to the configuration.
Parameters
| $name |
The name of the query.
|
| $dql |
The DQL query string.
|
|
#
|
public
|
getNamedQuery(string $name): string
Gets a previously registered named DQL query.
Gets a previously registered named DQL query.
Parameters
| $name |
The name of the query.
|
Returns
Throws
|
#
|
public
|
addNamedNativeQuery(string $name, string $sql, ResultSetMapping $rsm): void
Adds a named native query to the configuration.
Adds a named native query to the configuration.
Parameters
| $name |
The name of the query.
|
| $sql |
The native SQL query string.
|
| $rsm |
The ResultSetMapping used for the results of the SQL query.
|
|
#
|
public
|
getNamedNativeQuery(string $name): mixed[]
Gets the components of a previously registered named native query.
Gets the components of a previously registered named native query.
Parameters
| $name |
The name of the query.
|
Throws
|
#
|
public
|
ensureProductionSettings(): void
Ensures that this Configuration instance contains settings that are
suitable for a production environment.
Ensures that this Configuration instance contains settings that are
suitable for a production environment.
Throws
|
#
|
public
|
addCustomStringFunction(string $name, class-string<FunctionNode>|(callable(string): FunctionNode) $className): void
Registers a custom DQL function that produces a string value.
Such a function can then be used in any DQL statement in…
Registers a custom DQL function that produces a string value.
Such a function can then be used in any DQL statement in any place where string
functions are allowed.
DQL function names are case-insensitive.
Parameters
|
#
|
public
|
getCustomStringFunction(string $name): string|callable|null
Gets the implementation class name of a registered custom string DQL function.
Gets the implementation class name of a registered custom string DQL function.
|
#
|
public
|
setCustomStringFunctions(array<string, class-string<FunctionNode>|(callable(string): FunctionNode)> $functions): void
Sets a map of custom DQL string functions.
Sets a map of custom DQL string functions.
Keys must be function names and values the FQCN of the implementing class.
The function names will be case-insensitive in DQL.
Any previously added string functions are discarded.
Parameters
| $functions |
The map of custom
DQL string functions.
|
|
#
|
public
|
addCustomNumericFunction(string $name, class-string<FunctionNode>|(callable(string): FunctionNode) $className): void
Registers a custom DQL function that produces a numeric value.
Such a function can then be used in any DQL statement in…
Registers a custom DQL function that produces a numeric value.
Such a function can then be used in any DQL statement in any place where numeric
functions are allowed.
DQL function names are case-insensitive.
Parameters
|
#
|
public
|
getCustomNumericFunction(string $name): string|callable|null
Gets the implementation class name of a registered custom numeric DQL function.
Gets the implementation class name of a registered custom numeric DQL function.
|
#
|
public
|
setCustomNumericFunctions(array<string, class-string> $functions): void
Sets a map of custom DQL numeric functions.
Sets a map of custom DQL numeric functions.
Keys must be function names and values the FQCN of the implementing class.
The function names will be case-insensitive in DQL.
Any previously added numeric functions are discarded.
Parameters
| $functions |
The map of custom
DQL numeric functions.
|
|
#
|
public
|
addCustomDatetimeFunction(string $name, class-string<FunctionNode>|(callable(string): FunctionNode) $className): void
Registers a custom DQL function that produces a date/time value.
Such a function can then be used in any DQL statement…
Registers a custom DQL function that produces a date/time value.
Such a function can then be used in any DQL statement in any place where date/time
functions are allowed.
DQL function names are case-insensitive.
Parameters
|
#
|
public
|
getCustomDatetimeFunction(string $name): string|callable|null
Gets the implementation class name of a registered custom date/time DQL function.
Gets the implementation class name of a registered custom date/time DQL function.
|
#
|
public
|
setCustomDatetimeFunctions(array<string, class-string<FunctionNode>|(callable(string): FunctionNode)> $functions): void
Sets a map of custom DQL date/time functions.
Sets a map of custom DQL date/time functions.
Keys must be function names and values the FQCN of the implementing class.
The function names will be case-insensitive in DQL.
Any previously added date/time functions are discarded.
|
#
|
public
|
setTypedFieldMapper(?TypedFieldMapper $typedFieldMapper): void
Sets a TypedFieldMapper for php typed fields to DBAL types auto-completion.
Sets a TypedFieldMapper for php typed fields to DBAL types auto-completion.
|
#
|
public
|
getTypedFieldMapper(): ?TypedFieldMapper
Gets a TypedFieldMapper for php typed fields to DBAL types auto-completion.
Gets a TypedFieldMapper for php typed fields to DBAL types auto-completion.
|
#
|
public
|
setCustomHydrationModes(array<string, class-string<AbstractHydrator>> $modes): void
Sets the custom hydrator modes in one pass.
Sets the custom hydrator modes in one pass.
Parameters
| $modes |
An array of ($modeName => $hydrator).
|
|
#
|
public
|
getCustomHydrationMode(string $modeName): string|null
Gets the hydrator class for the given hydration mode name.
Gets the hydrator class for the given hydration mode name.
Parameters
| $modeName |
The hydration mode name.
|
Returns
|
#
|
public
|
addCustomHydrationMode(string $modeName, class-string<AbstractHydrator> $hydrator): void
Adds a custom hydration mode.
Adds a custom hydration mode.
Parameters
| $modeName |
The hydration mode name.
|
|
#
|
public
|
setClassMetadataFactoryName(class-string $cmfName): void
Sets a class metadata factory.
Sets a class metadata factory.
|
#
|
public
|
getClassMetadataFactoryName(): string
|
#
|
public
|
addFilter(string $name, class-string<SQLFilter> $className): void
Adds a filter to the list of possible filters.
Adds a filter to the list of possible filters.
Parameters
| $name |
The name of the filter.
|
|
#
|
public
|
getFilterClassName(string $name): string|null
Gets the class name for a given filter name.
Gets the class name for a given filter name.
Parameters
| $name |
The name of the filter.
|
Returns
The class name of the filter, or null if it is not
defined.
|
#
|
public
|
setDefaultRepositoryClassName(class-string<EntityRepository> $className): void
Sets default repository class.
Sets default repository class.
Throws
|
#
|
public
|
getDefaultRepositoryClassName(): string
Get default repository class.
Get default repository class.
|
#
|
public
|
setNamingStrategy(NamingStrategy $namingStrategy): void
Sets naming strategy.
|
#
|
public
|
getNamingStrategy(): NamingStrategy
Gets naming strategy..
|
#
|
public
|
setQuoteStrategy(QuoteStrategy $quoteStrategy): void
Sets quote strategy.
|
#
|
public
|
getQuoteStrategy(): QuoteStrategy
Gets quote strategy.
|
#
|
public
|
setEntityListenerResolver(EntityListenerResolver $resolver): void
Set the entity listener resolver.
Set the entity listener resolver.
|
#
|
public
|
getEntityListenerResolver(): EntityListenerResolver
Get the entity listener resolver.
Get the entity listener resolver.
|
#
|
public
|
setRepositoryFactory(RepositoryFactory $repositoryFactory): void
Set the entity repository factory.
Set the entity repository factory.
|
#
|
public
|
getRepositoryFactory(): RepositoryFactory
Get the entity repository factory.
Get the entity repository factory.
|
#
|
public
|
isSecondLevelCacheEnabled(): bool
|
#
|
public
|
setSecondLevelCacheEnabled(bool $flag = true): void
|
#
|
public
|
setSecondLevelCacheConfiguration(CacheConfiguration $cacheConfig): void
|
#
|
public
|
getSecondLevelCacheConfiguration(): CacheConfiguration|null
|
#
|
public
|
getDefaultQueryHints()
Returns query hints, which will be applied to every query in application
Returns query hints, which will be applied to every query in application
|
#
|
public
|
setDefaultQueryHints(array<string, mixed> $defaultQueryHints): void
Sets array of query hints, which will be applied to every query in application
Sets array of query hints, which will be applied to every query in application
|
#
|
public
|
getDefaultQueryHint(string $name): mixed
Gets the value of a default query hint. If the hint name is not recognized, FALSE is returned.
Gets the value of a default query hint. If the hint name is not recognized, FALSE is returned.
Parameters
| $name |
The name of the hint.
|
Returns
The value of the hint or FALSE, if the hint name is not recognized.
|
#
|
public
|
setDefaultQueryHint(string $name, mixed $value): void
Sets a default query hint. If the hint name is not recognized, it is silently ignored.
Sets a default query hint. If the hint name is not recognized, it is silently ignored.
Parameters
| $name |
The name of the hint.
|
| $value |
The value of the hint.
|
|
#
|
public
|
getSchemaIgnoreClasses(): list<class-string>
Gets a list of entity class names to be ignored by the SchemaTool
Gets a list of entity class names to be ignored by the SchemaTool
|
#
|
public
|
setSchemaIgnoreClasses(list<class-string> $schemaIgnoreClasses): void
Sets a list of entity class names to be ignored by the SchemaTool
Sets a list of entity class names to be ignored by the SchemaTool
Parameters
| $schemaIgnoreClasses |
List of entity class names
|
|
#
|
public
|
isLazyGhostObjectEnabled(): bool
|
#
|
public
|
setLazyGhostObjectEnabled(bool $flag): void
|
#
|
public
|
setRejectIdCollisionInIdentityMap(bool $flag): void
|
#
|
public
|
isRejectIdCollisionInIdentityMapEnabled(): bool
|
#
|