| Methods |
public
|
setCache(CacheItemPoolInterface $cache): void
|
#
|
final
protected
|
getCache(): ?CacheItemPoolInterface
|
#
|
public
|
getLoadedMetadata(): ClassMetadata[]
Returns an array of all the loaded metadata currently in memory.
Returns an array of all the loaded metadata currently in memory.
|
#
|
public
|
getAllMetadata()
{@inheritDoc}
Returns
The ClassMetadata instances of all mapped classes.
Implements
|
#
|
public
|
setProxyClassNameResolver(ProxyClassNameResolver $resolver): void
|
#
|
abstract
protected
|
initialize(): void
Lazy initialization of this stuff, especially the metadata driver,
since these are not needed at all when a metadata…
Lazy initialization of this stuff, especially the metadata driver,
since these are not needed at all when a metadata cache is active.
Implemented by
|
#
|
abstract
protected
|
getDriver(): MappingDriver
Returns the mapping driver implementation.
Returns the mapping driver implementation.
Implemented by
|
#
|
abstract
protected
|
wakeupReflection(CMTemplate $class, ReflectionService $reflService): void
Wakes up reflection after ClassMetadata gets unserialized from cache.
Wakes up reflection after ClassMetadata gets unserialized from cache.
Implemented by
|
#
|
abstract
protected
|
initializeReflection(CMTemplate $class, ReflectionService $reflService): void
Initializes Reflection after ClassMetadata was constructed.
Initializes Reflection after ClassMetadata was constructed.
Implemented by
|
#
|
abstract
protected
|
isEntity(CMTemplate $class): bool
Checks whether the class metadata is an entity.
Checks whether the class metadata is an entity.
This method should return false for mapped superclasses or embedded classes.
Implemented by
|
#
|
private
|
normalizeClassName(class-string $className): string
Removes the prepended backslash of a class string to conform with how php outputs class names
Removes the prepended backslash of a class string to conform with how php outputs class names
|
#
|
public
|
getMetadataFor(string $className)
{@inheritDoc}
Parameters
| $className |
The name of the class.
|
Throws
Implements
|
#
|
public
|
hasMetadataFor(string $className)
{@inheritDoc}
Returns
TRUE if the metadata of the class in question is already loaded, FALSE otherwise.
Implements
|
#
|
public
|
setMetadataFor(class-string $className, CMTemplate $class): void
Sets the metadata descriptor for a specific class.
Sets the metadata descriptor for a specific class.
NOTE: This is only useful in very special cases, like when generating proxy classes.
Implements
|
#
|
protected
|
getParentClasses(class-string $name): string[]
Gets an array of parent classes for the given entity class.
Gets an array of parent classes for the given entity class.
|
#
|
protected
|
loadMetadata(class-string $name): array<int, string>
Loads the metadata of the class in question and all it's ancestors whose metadata
is still not loaded.
Loads the metadata of the class in question and all it's ancestors whose metadata
is still not loaded.
Important: The class $name does not necessarily exist at this point here.
Scenarios in a code-generation setup might have access to XML/YAML
Mapping files without the actual PHP code existing here. That is why the
{@see \Doctrine\Persistence\Mapping\ReflectionService} interface
should be used for reflection.
|
#
|
protected
|
onNotFoundMetadata(string $className): ClassMetadata|null
Provides a fallback hook for loading metadata when loading failed due to reflection/mapping exceptions
Provides a fallback hook for loading metadata when loading failed due to reflection/mapping exceptions
Override this method to implement a fallback strategy for failed metadata loading
Overriden by
|
#
|
abstract
protected
|
doLoadMetadata(
CMTemplate $class,
CMTemplate|null $parent,
bool $rootEntityFound,
list<class-string> $nonSuperclassParents,
): void
Actually loads the metadata from the underlying metadata.
Actually loads the metadata from the underlying metadata.
Parameters
| $rootEntityFound |
True when there is another entity (non-mapped superclass) class above the current class in the PHP class hierarchy.
|
| $nonSuperclassParents |
All parent class names that are not marked as mapped superclasses, with the direct parent class being the first and the root entity class the last element.
|
Implemented by
|
#
|
abstract
protected
|
newClassMetadataInstance<T is object>(class-string<T> $className): ClassMetadata<T>
Creates a new ClassMetadata instance for the given class name.
Creates a new ClassMetadata instance for the given class name.
Implemented by
|
#
|
public
|
isTransient(string $className)
{@inheritDoc}
|
#
|
public
|
setReflectionService(ReflectionService $reflectionService): void
Sets the reflectionService.
Sets the reflectionService.
|
#
|
public
|
getReflectionService(): ReflectionService
Gets the reflection service associated with this metadata factory.
Gets the reflection service associated with this metadata factory.
|
#
|
protected
|
getCacheKey(string $realClassName): string
|
#
|
private
|
getRealClass<T is object>(class-string<Proxy<T>>|class-string<T> $class): string
Gets the real class name of a class name that could be a proxy.
Gets the real class name of a class name that could be a proxy.
|
#
|
private
|
createDefaultProxyClassNameResolver(): void
|
#
|