Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory
The ClassMetadataFactory is used to create ClassMetadata objects that contain all the metadata mapping informations of a class which describes how a class should be mapped to a relational database.
This class was abstracted from the ORM ClassMetadataFactory
- Author: Benjamin Eberlei <kontakt@beberlei.de>
Synopsis
class AbstractClassMetadataFactory
implements
ClassMetadataFactory
{
- // members
- protected string $cacheSalt;
- private Cache $cacheDriver;
- private array $loadedMetadata;
- protected bool $initialized;
- private ReflectionService $reflectionService;
- // methods
- public void setCacheDriver()
- public Cache getCacheDriver()
- public array getLoadedMetadata()
- public array getAllMetadata()
- protected abstract void initialize()
- protected abstract string getFqcnFromAlias()
- protected abstract MappingDriver getDriver()
- protected abstract void wakeupReflection()
- protected abstract void initializeReflection()
- protected abstract boolean isEntity()
- public ClassMetadata getMetadataFor()
- public boolean hasMetadataFor()
- public void setMetadataFor()
- protected array getParentClasses()
- protected array loadMetadata()
- protected abstract void doLoadMetadata()
- protected abstract ClassMetadata newClassMetadataInstance()
- public bool isTransient()
- public void setReflectionService()
- public ReflectionService getReflectionService()
Hierarchy
Extended by
Implements
Members
private
- $cacheDriver — \Doctrine\Common\Cache\Cache
- $loadedMetadata — array
- $reflectionService — Doctrine\Common\Persistence\Mapping\ReflectionService
protected
- $cacheSalt
—
string
Salt used by specific Object Manager implementation. - $initialized — Doctrine\Common\Persistence\Mapping\bool
Methods
protected
- doLoadMetadata() — Actually load the metadata from the underlying metadata
- getDriver() — Return the mapping driver implementation.
- getFqcnFromAlias() — Get the fully qualified class-name from the namespace alias.
- getParentClasses() — Get array of parent classes for the given entity class
- initialize() — Lazy initialization of this stuff, especially the metadata driver, since these are not needed at all when a metadata cache is active.
- initializeReflection() — Initialize Reflection after ClassMetadata was constructed.
- isEntity() — Checks whether the class metadata is an entity.
- loadMetadata() — Loads the metadata of the class in question and all it's ancestors whose metadata is still not loaded.
- newClassMetadataInstance() — Creates a new ClassMetadata instance for the given class name.
- wakeupReflection() — Wakeup reflection after ClassMetadata gets unserialized from cache.
public
- getAllMetadata() — Forces the factory to load the metadata of all classes known to the underlying mapping driver.
- getCacheDriver() — Gets the cache driver used by the factory to cache ClassMetadata instances.
- getLoadedMetadata() — Return an array of all the loaded metadata currently in memory.
- getMetadataFor() — Gets the class metadata descriptor for a class.
- getReflectionService() — Get the reflection service associated with this metadata factory.
- hasMetadataFor() — Checks whether the factory has the metadata for a class loaded already.
- isTransient() — Check if this class is mapped by this Object Manager + ClassMetadata configuration
- setCacheDriver() — Sets the cache driver used by the factory to cache ClassMetadata instances.
- setMetadataFor() — Sets the metadata descriptor for a specific class.
- setReflectionService() — Set reflectionService.