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
파일 보기 프로젝트 열기: doctrine/common 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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