PHP Класс Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory

This class was abstracted from the ORM ClassMetadataFactory
С версии: 2.2
Автор: Benjamin Eberlei ([email protected])
Автор: Guilherme Blanco ([email protected])
Автор: Jonathan Wage ([email protected])
Автор: Roman Borschel ([email protected])
Наследование: implements Doctrine\Common\Persistence\Mapping\ClassMetadataFactory
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$cacheSalt string Salt used by specific Object Manager implementation.
$initialized boolean

Открытые методы

Метод Описание
getAllMetadata ( ) : array Forces the factory to load the metadata of all classes known to the underlying mapping driver.
getCacheDriver ( ) : Doctrine\Common\Cache\Cache | null Gets the cache driver used by the factory to cache ClassMetadata instances.
getLoadedMetadata ( ) : Doctrine\Common\Persistence\Mapping\ClassMetadata[] Returns an array of all the loaded metadata currently in memory.
getMetadataFor ( string $className ) : Doctrine\Common\Persistence\Mapping\ClassMetadata Gets the class metadata descriptor for a class.
getReflectionService ( ) : Doctrine\Common\Persistence\Mapping\ReflectionService Gets the reflection service associated with this metadata factory.
hasMetadataFor ( string $className ) : boolean Checks whether the factory has the metadata for a class loaded already.
isTransient ( $class ) {@inheritDoc}
setCacheDriver ( Doctrine\Common\Cache\Cache $cacheDriver = null ) : void Sets the cache driver used by the factory to cache ClassMetadata instances.
setMetadataFor ( string $className, Doctrine\Common\Persistence\Mapping\ClassMetadata $class ) : void Sets the metadata descriptor for a specific class.
setReflectionService ( Doctrine\Common\Persistence\Mapping\ReflectionService $reflectionService ) : void Sets the reflectionService.

Защищенные методы

Метод Описание
doLoadMetadata ( Doctrine\Common\Persistence\Mapping\ClassMetadata $class, Doctrine\Common\Persistence\Mapping\ClassMetadata | null $parent, boolean $rootEntityFound, array $nonSuperclassParents ) : void Actually loads the metadata from the underlying metadata.
getDriver ( ) : Doctrine\Common\Persistence\Mapping\Driver\MappingDriver Returns the mapping driver implementation.
getFqcnFromAlias ( string $namespaceAlias, string $simpleClassName ) : string Gets the fully qualified class-name from the namespace alias.
getParentClasses ( string $name ) : array Gets an array of parent classes for the given entity class.
initialize ( ) : void Lazy initialization of this stuff, especially the metadata driver, since these are not needed at all when a metadata cache is active.
initializeReflection ( Doctrine\Common\Persistence\Mapping\ClassMetadata $class, Doctrine\Common\Persistence\Mapping\ReflectionService $reflService ) : void Initializes Reflection after ClassMetadata was constructed.
isEntity ( Doctrine\Common\Persistence\Mapping\ClassMetadata $class ) : boolean Checks whether the class metadata is an entity.
loadMetadata ( string $name ) : array Loads the metadata of the class in question and all it's ancestors whose metadata is still not loaded.
newClassMetadataInstance ( string $className ) : Doctrine\Common\Persistence\Mapping\ClassMetadata Creates a new ClassMetadata instance for the given class name.
onNotFoundMetadata ( string $className ) : Doctrine\Common\Persistence\Mapping\ClassMetadata | null Provides a fallback hook for loading metadata when loading failed due to reflection/mapping exceptions
wakeupReflection ( Doctrine\Common\Persistence\Mapping\ClassMetadata $class, Doctrine\Common\Persistence\Mapping\ReflectionService $reflService ) : void Wakes up reflection after ClassMetadata gets unserialized from cache.

Описание методов

doLoadMetadata() абстрактный защищенный метод

Actually loads the metadata from the underlying metadata.
abstract protected doLoadMetadata ( Doctrine\Common\Persistence\Mapping\ClassMetadata $class, Doctrine\Common\Persistence\Mapping\ClassMetadata | null $parent, boolean $rootEntityFound, array $nonSuperclassParents ) : void
$class Doctrine\Common\Persistence\Mapping\ClassMetadata
$parent Doctrine\Common\Persistence\Mapping\ClassMetadata | null
$rootEntityFound boolean
$nonSuperclassParents array All parent class names that are not marked as mapped superclasses.
Результат void

getAllMetadata() публичный метод

Forces the factory to load the metadata of all classes known to the underlying mapping driver.
public getAllMetadata ( ) : array
Результат array The ClassMetadata instances of all mapped classes.

getCacheDriver() публичный метод

Gets the cache driver used by the factory to cache ClassMetadata instances.
public getCacheDriver ( ) : Doctrine\Common\Cache\Cache | null
Результат Doctrine\Common\Cache\Cache | null

getDriver() абстрактный защищенный метод

Returns the mapping driver implementation.
abstract protected getDriver ( ) : Doctrine\Common\Persistence\Mapping\Driver\MappingDriver
Результат Doctrine\Common\Persistence\Mapping\Driver\MappingDriver

getFqcnFromAlias() абстрактный защищенный метод

Gets the fully qualified class-name from the namespace alias.
abstract protected getFqcnFromAlias ( string $namespaceAlias, string $simpleClassName ) : string
$namespaceAlias string
$simpleClassName string
Результат string

getLoadedMetadata() публичный метод

Returns an array of all the loaded metadata currently in memory.
public getLoadedMetadata ( ) : Doctrine\Common\Persistence\Mapping\ClassMetadata[]
Результат Doctrine\Common\Persistence\Mapping\ClassMetadata[]

getMetadataFor() публичный метод

Gets the class metadata descriptor for a class.
public getMetadataFor ( string $className ) : Doctrine\Common\Persistence\Mapping\ClassMetadata
$className string The name of the class.
Результат Doctrine\Common\Persistence\Mapping\ClassMetadata

getParentClasses() защищенный метод

Gets an array of parent classes for the given entity class.
protected getParentClasses ( string $name ) : array
$name string
Результат array

getReflectionService() публичный метод

Gets the reflection service associated with this metadata factory.
public getReflectionService ( ) : Doctrine\Common\Persistence\Mapping\ReflectionService
Результат Doctrine\Common\Persistence\Mapping\ReflectionService

hasMetadataFor() публичный метод

Checks whether the factory has the metadata for a class loaded already.
public hasMetadataFor ( string $className ) : boolean
$className string
Результат boolean TRUE if the metadata of the class in question is already loaded, FALSE otherwise.

initialize() абстрактный защищенный метод

Lazy initialization of this stuff, especially the metadata driver, since these are not needed at all when a metadata cache is active.
abstract protected initialize ( ) : void
Результат void

initializeReflection() абстрактный защищенный метод

Initializes Reflection after ClassMetadata was constructed.
abstract protected initializeReflection ( Doctrine\Common\Persistence\Mapping\ClassMetadata $class, Doctrine\Common\Persistence\Mapping\ReflectionService $reflService ) : void
$class Doctrine\Common\Persistence\Mapping\ClassMetadata
$reflService Doctrine\Common\Persistence\Mapping\ReflectionService
Результат void

isEntity() абстрактный защищенный метод

This method should return false for mapped superclasses or embedded classes.
abstract protected isEntity ( Doctrine\Common\Persistence\Mapping\ClassMetadata $class ) : boolean
$class Doctrine\Common\Persistence\Mapping\ClassMetadata
Результат boolean

isTransient() публичный метод

{@inheritDoc}
public isTransient ( $class )

loadMetadata() защищенный метод

Important: The class $name does not necesarily 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\Common\Persistence\Mapping\ReflectionService} interface should be used for reflection.
protected loadMetadata ( string $name ) : array
$name string The name of the class for which the metadata should get loaded.
Результат array

newClassMetadataInstance() абстрактный защищенный метод

Creates a new ClassMetadata instance for the given class name.
abstract protected newClassMetadataInstance ( string $className ) : Doctrine\Common\Persistence\Mapping\ClassMetadata
$className string
Результат Doctrine\Common\Persistence\Mapping\ClassMetadata

onNotFoundMetadata() защищенный метод

Override this method to implement a fallback strategy for failed metadata loading
protected onNotFoundMetadata ( string $className ) : Doctrine\Common\Persistence\Mapping\ClassMetadata | null
$className string
Результат Doctrine\Common\Persistence\Mapping\ClassMetadata | null

setCacheDriver() публичный метод

Sets the cache driver used by the factory to cache ClassMetadata instances.
public setCacheDriver ( Doctrine\Common\Cache\Cache $cacheDriver = null ) : void
$cacheDriver Doctrine\Common\Cache\Cache
Результат void

setMetadataFor() публичный метод

NOTE: This is only useful in very special cases, like when generating proxy classes.
public setMetadataFor ( string $className, Doctrine\Common\Persistence\Mapping\ClassMetadata $class ) : void
$className string
$class Doctrine\Common\Persistence\Mapping\ClassMetadata
Результат void

setReflectionService() публичный метод

Sets the reflectionService.
public setReflectionService ( Doctrine\Common\Persistence\Mapping\ReflectionService $reflectionService ) : void
$reflectionService Doctrine\Common\Persistence\Mapping\ReflectionService
Результат void

wakeupReflection() абстрактный защищенный метод

Wakes up reflection after ClassMetadata gets unserialized from cache.
abstract protected wakeupReflection ( Doctrine\Common\Persistence\Mapping\ClassMetadata $class, Doctrine\Common\Persistence\Mapping\ReflectionService $reflService ) : void
$class Doctrine\Common\Persistence\Mapping\ClassMetadata
$reflService Doctrine\Common\Persistence\Mapping\ReflectionService
Результат void

Описание свойств

$cacheSalt защищенное свойство

Salt used by specific Object Manager implementation.
protected string $cacheSalt
Результат string

$initialized защищенное свойство

protected bool $initialized
Результат boolean