Doctrine\ORM\Mapping\ClassMetadataFactory
The ClassMetadataFactory is used to create ClassMetadata objects that contain all the metadata mapping information of a class which describes how a class should be mapped to a relational database.
- Author: Benjamin Eberlei <kontakt@beberlei.de>
Synopsis
class ClassMetadataFactory
extends AbstractClassMetadataFactory
{
- // members
- private EntityManager $em;
- private AbstractPlatform $targetPlatform;
- private MappingDriver $driver;
- private EventManager $evm;
- // Inherited members from AbstractClassMetadataFactory
- protected string $cacheSalt;
- protected bool $initialized;
- // methods
- public void setEntityManager()
- protected void initialize()
- protected void doLoadMetadata()
- protected void validateRuntimeMetadata()
- protected void newClassMetadataInstance()
- private void addDefaultDiscriminatorMap()
- private string getShortName()
- private void addInheritedFields()
- private void addInheritedRelations()
- private void addInheritedNamedQueries()
- private void addInheritedNamedNativeQueries()
- private void addInheritedSqlResultSetMappings()
- private void completeIdGeneratorMapping()
- protected void wakeupReflection()
- protected void initializeReflection()
- protected void getFqcnFromAlias()
- protected void getDriver()
- protected void isEntity()
- // Inherited methods from AbstractClassMetadataFactory
- 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
Extends
Extended by
Members
private
- $driver — \Doctrine\Common\Persistence\Mapping\Driver\MappingDriver
- $em — Doctrine\ORM\EntityManager
- $evm — \Doctrine\Common\EventManager
- $targetPlatform — \Doctrine\DBAL\Platforms\AbstractPlatform
protected
- $cacheSalt
—
string
Salt used by specific Object Manager implementation. - $initialized — Doctrine\Common\Persistence\Mapping\bool
Methods
private
- addDefaultDiscriminatorMap() — Adds a default discriminator map if no one is given
- addInheritedFields() — Adds inherited fields to the subclass mapping.
- addInheritedNamedNativeQueries() — Adds inherited named native queries to the subclass mapping.
- addInheritedNamedQueries() — Adds inherited named queries to the subclass mapping.
- addInheritedRelations() — Adds inherited association mappings to the subclass mapping.
- addInheritedSqlResultSetMappings() — Adds inherited sql result set mappings to the subclass mapping.
- completeIdGeneratorMapping() — Completes the ID generator mapping. If "auto" is specified we choose the generator most appropriate for the targeted database platform.
- getShortName() — Get the lower-case short name of a class.
protected
- doLoadMetadata() — {@inheritDoc}
- getDriver() — {@inheritDoc}
- getFqcnFromAlias() — {@inheritDoc}
- initialize() — {@inheritDoc}.
- initializeReflection() — {@inheritDoc}
- isEntity() — {@inheritDoc}
- newClassMetadataInstance() — {@inheritDoc}
- validateRuntimeMetadata() — Validate runtime metadata is correctly defined.
- wakeupReflection() — {@inheritDoc}
public
Inherited from Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory
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.