PHP 클래스 Neos\Flow\Persistence\Doctrine\Mapping\Driver\FlowAnnotationDriver

It gives precedence to Doctrine annotations but fills gaps from other info if possible: - Entity.repositoryClass is set to the repository found in the class schema - Table.name is set to a sane value - Column.type is set to property type - *.targetEntity is set to property type If a property is not marked as an association the mapping type is set to "object" for objects.
상속: implements Doctrine\Common\Persistence\Mapping\Driver\MappingDriver, implements Neos\Flow\Aop\Pointcut\PointcutFilterInterface
파일 보기 프로젝트 열기: neos/flow-development-collection

보호된 프로퍼티들

프로퍼티 타입 설명
$classNames array
$entityManager Doctrine\Common\Persistence\ObjectManager
$reader Doctrine\Common\Annotations\AnnotationReader
$reflectionService Neos\Flow\Reflection\ReflectionService
$tableNameLengthLimit integer

공개 메소드들

메소드 설명
__construct ( ) Initializes a new AnnotationDriver that uses the given AnnotationReader for reading docblock annotations.
getAllClassNames ( ) : array Returns the names of all mapped (non-transient) classes known to this driver.
getRuntimeEvaluationsDefinition ( ) : array Returns runtime evaluations for a previously matched pointcut
hasRuntimeEvaluationsDefinition ( ) : boolean Returns TRUE if this filter holds runtime evaluations for a previously matched pointcut
inferTableNameFromClassName ( string $className, integer $lengthLimit = null ) : string Given a class name a table name is returned. That name should be reasonably unique.
injectReflectionService ( ReflectionService $reflectionService ) : void
isTransient ( string $className ) : boolean Returns whether the class with the specified name is transient. Only non-transient classes, that is entities and mapped superclasses, should have their metadata loaded.
loadMetadataForClass ( string $className, Doctrine\Common\Persistence\Mapping\ClassMetadata $metadata ) : void Loads the metadata for the specified class into the provided container.
matches ( string $className, string $methodName, string $methodDeclaringClassName, mixed $pointcutQueryIdentifier ) : boolean Checks if the specified class has a property annotated with Id
reduceTargetClassNames ( ClassNameIndex $classNameIndex ) : ClassNameIndex This method is used to optimize the matching process.
setEntityManager ( Doctrine\Common\Persistence\ObjectManager $entityManager ) : void

보호된 메소드들

메소드 설명
addColumnToMappingArray ( Doctrine\ORM\Mapping\Column $columnAnnotation, array $mapping = [], string $fieldName = null ) : array Parse the given Column into an array
buildJoinColumnsIfNeeded ( array $joinColumns, array $mapping, ReflectionProperty $property, integer $direction = self::MAPPING_REGULAR ) : array Check if the referenced column name is set (and valid) and if not make sure it is initialized properly.
buildJoinTableColumnName ( string $className ) : string Build a name for a column in a jointable.
evaluateEntityListenersAnnotation ( ReflectionClass $class, Doctrine\ORM\Mapping\ClassMetadata $metadata, array $classAnnotations ) : void Evaluate the EntityListeners annotation and amend the metadata accordingly.
evaluateJoinColumnAnnotations ( ReflectionProperty $property ) : array Check for and build JoinColummn/JoinColumns annotations.
evaluateJoinTableAnnotation ( Doctrine\ORM\Mapping\JoinTable $joinTableAnnotation, ReflectionProperty $property, string $className, array $mapping ) : array Evaluate JoinTable annotations and fill missing bits as needed.
evaluateLifeCycleAnnotations ( ReflectionClass $class, Doctrine\ORM\Mapping\ClassMetadataInfo $metadata ) : void Evaluate the lifecycle annotations and amend the metadata accordingly.
evaluateOverridesAnnotations ( array $classAnnotations, Doctrine\ORM\Mapping\ClassMetadataInfo $metadata ) : void Evaluate the association overrides annotations and amend the metadata accordingly.
evaluatePropertyAnnotations ( Doctrine\ORM\Mapping\ClassMetadataInfo $metadata ) : void Evaluate the property annotations and amend the metadata accordingly.
getClassSchema ( string $className ) : ClassSchema Fetch a class schema for the given class, if possible.
getMaxIdentifierLength ( ) : integer Derive maximum identifier length from doctrine DBAL
getMethodCallbacks ( ReflectionMethod $method ) : array Returns an array of callbacks for lifecycle annotations on the given method.
getUnproxiedClassName ( string $className ) : string Returns the classname after stripping a potentially present Compiler::ORIGINAL_CLASSNAME_SUFFIX.
inferJoinTableNameFromClassAndPropertyName ( string $className, string $propertyName ) : string Given a class and property name a table name is returned. That name should be reasonably unique.
isAggregateRoot ( string $className, string $propertySourceHint ) : boolean Check for $className being an aggregate root.
isValueObject ( string $className, string $propertySourceHint ) : boolean Check for $className being a value object.
joinColumnToArray ( Doctrine\ORM\Mapping\JoinColumn $joinColumnAnnotation, string $propertyName = null ) : array Parse the given JoinColumn into an array
truncateIdentifier ( string $identifier, integer $lengthLimit = null, string $hashSource = null ) : string Truncate an identifier if needed and append a hash to ensure uniqueness.

비공개 메소드들

메소드 설명
getFetchMode ( string $className, string $fetchMode ) : integer Attempts to resolve the fetch mode.

메소드 상세

__construct() 공개 메소드

Initializes a new AnnotationDriver that uses the given AnnotationReader for reading docblock annotations.
public __construct ( )

addColumnToMappingArray() 보호된 메소드

Parse the given Column into an array
protected addColumnToMappingArray ( Doctrine\ORM\Mapping\Column $columnAnnotation, array $mapping = [], string $fieldName = null ) : array
$columnAnnotation Doctrine\ORM\Mapping\Column
$mapping array
$fieldName string
리턴 array

buildJoinColumnsIfNeeded() 보호된 메소드

Check if the referenced column name is set (and valid) and if not make sure it is initialized properly.
protected buildJoinColumnsIfNeeded ( array $joinColumns, array $mapping, ReflectionProperty $property, integer $direction = self::MAPPING_REGULAR ) : array
$joinColumns array
$mapping array
$property ReflectionProperty
$direction integer regular or inverse mapping (use is to be coded)
리턴 array

buildJoinTableColumnName() 보호된 메소드

Build a name for a column in a jointable.
protected buildJoinTableColumnName ( string $className ) : string
$className string
리턴 string

evaluateEntityListenersAnnotation() 보호된 메소드

Evaluate the EntityListeners annotation and amend the metadata accordingly.
protected evaluateEntityListenersAnnotation ( ReflectionClass $class, Doctrine\ORM\Mapping\ClassMetadata $metadata, array $classAnnotations ) : void
$class ReflectionClass
$metadata Doctrine\ORM\Mapping\ClassMetadata
$classAnnotations array
리턴 void

evaluateJoinColumnAnnotations() 보호된 메소드

If no annotations are found, a default is returned.
protected evaluateJoinColumnAnnotations ( ReflectionProperty $property ) : array
$property ReflectionProperty
리턴 array

evaluateJoinTableAnnotation() 보호된 메소드

Evaluate JoinTable annotations and fill missing bits as needed.
protected evaluateJoinTableAnnotation ( Doctrine\ORM\Mapping\JoinTable $joinTableAnnotation, ReflectionProperty $property, string $className, array $mapping ) : array
$joinTableAnnotation Doctrine\ORM\Mapping\JoinTable
$property ReflectionProperty
$className string
$mapping array
리턴 array

evaluateLifeCycleAnnotations() 보호된 메소드

Evaluate the lifecycle annotations and amend the metadata accordingly.
protected evaluateLifeCycleAnnotations ( ReflectionClass $class, Doctrine\ORM\Mapping\ClassMetadataInfo $metadata ) : void
$class ReflectionClass
$metadata Doctrine\ORM\Mapping\ClassMetadataInfo
리턴 void

evaluateOverridesAnnotations() 보호된 메소드

Evaluate the association overrides annotations and amend the metadata accordingly.
protected evaluateOverridesAnnotations ( array $classAnnotations, Doctrine\ORM\Mapping\ClassMetadataInfo $metadata ) : void
$classAnnotations array
$metadata Doctrine\ORM\Mapping\ClassMetadataInfo
리턴 void

evaluatePropertyAnnotations() 보호된 메소드

Evaluate the property annotations and amend the metadata accordingly.
protected evaluatePropertyAnnotations ( Doctrine\ORM\Mapping\ClassMetadataInfo $metadata ) : void
$metadata Doctrine\ORM\Mapping\ClassMetadataInfo
리턴 void

getAllClassNames() 공개 메소드

Returns the names of all mapped (non-transient) classes known to this driver.
public getAllClassNames ( ) : array
리턴 array

getClassSchema() 보호된 메소드

Fetch a class schema for the given class, if possible.
protected getClassSchema ( string $className ) : ClassSchema
$className string
리턴 Neos\Flow\Reflection\ClassSchema

getMaxIdentifierLength() 보호된 메소드

Derive maximum identifier length from doctrine DBAL
protected getMaxIdentifierLength ( ) : integer
리턴 integer

getMethodCallbacks() 보호된 메소드

Returns an array of callbacks for lifecycle annotations on the given method.
protected getMethodCallbacks ( ReflectionMethod $method ) : array
$method ReflectionMethod
리턴 array

getRuntimeEvaluationsDefinition() 공개 메소드

Returns runtime evaluations for a previously matched pointcut
public getRuntimeEvaluationsDefinition ( ) : array
리턴 array Runtime evaluations

getUnproxiedClassName() 보호된 메소드

Returns the classname after stripping a potentially present Compiler::ORIGINAL_CLASSNAME_SUFFIX.
protected getUnproxiedClassName ( string $className ) : string
$className string
리턴 string

hasRuntimeEvaluationsDefinition() 공개 메소드

Returns TRUE if this filter holds runtime evaluations for a previously matched pointcut
public hasRuntimeEvaluationsDefinition ( ) : boolean
리턴 boolean TRUE if this filter has runtime evaluations

inferJoinTableNameFromClassAndPropertyName() 보호된 메소드

Given a class and property name a table name is returned. That name should be reasonably unique.
protected inferJoinTableNameFromClassAndPropertyName ( string $className, string $propertyName ) : string
$className string Model class name the table corresponds to
$propertyName string Name of the property to be joined
리턴 string Truncated database table name

inferTableNameFromClassName() 공개 메소드

Given a class name a table name is returned. That name should be reasonably unique.
public inferTableNameFromClassName ( string $className, integer $lengthLimit = null ) : string
$className string
$lengthLimit integer
리턴 string

injectReflectionService() 공개 메소드

public injectReflectionService ( ReflectionService $reflectionService ) : void
$reflectionService Neos\Flow\Reflection\ReflectionService
리턴 void

isAggregateRoot() 보호된 메소드

Check for $className being an aggregate root.
protected isAggregateRoot ( string $className, string $propertySourceHint ) : boolean
$className string
$propertySourceHint string
리턴 boolean

isTransient() 공개 메소드

Returns whether the class with the specified name is transient. Only non-transient classes, that is entities and mapped superclasses, should have their metadata loaded.
public isTransient ( string $className ) : boolean
$className string
리턴 boolean

isValueObject() 보호된 메소드

Check for $className being a value object.
protected isValueObject ( string $className, string $propertySourceHint ) : boolean
$className string
$propertySourceHint string
리턴 boolean

joinColumnToArray() 보호된 메소드

Parse the given JoinColumn into an array
protected joinColumnToArray ( Doctrine\ORM\Mapping\JoinColumn $joinColumnAnnotation, string $propertyName = null ) : array
$joinColumnAnnotation Doctrine\ORM\Mapping\JoinColumn
$propertyName string
리턴 array

loadMetadataForClass() 공개 메소드

Loads the metadata for the specified class into the provided container.
public loadMetadataForClass ( string $className, Doctrine\Common\Persistence\Mapping\ClassMetadata $metadata ) : void
$className string
$metadata Doctrine\Common\Persistence\Mapping\ClassMetadata
리턴 void

matches() 공개 메소드

Checks if the specified class has a property annotated with Id
public matches ( string $className, string $methodName, string $methodDeclaringClassName, mixed $pointcutQueryIdentifier ) : boolean
$className string Name of the class to check against
$methodName string Name of the method to check against
$methodDeclaringClassName string Name of the class the method was originally declared in
$pointcutQueryIdentifier mixed Some identifier for this query - must at least differ from a previous identifier. Used for circular reference detection.
리턴 boolean TRUE if the class has *no* Id properties

reduceTargetClassNames() 공개 메소드

This method is used to optimize the matching process.
public reduceTargetClassNames ( ClassNameIndex $classNameIndex ) : ClassNameIndex
$classNameIndex Neos\Flow\Aop\Builder\ClassNameIndex
리턴 Neos\Flow\Aop\Builder\ClassNameIndex

setEntityManager() 공개 메소드

public setEntityManager ( Doctrine\Common\Persistence\ObjectManager $entityManager ) : void
$entityManager Doctrine\Common\Persistence\ObjectManager
리턴 void

truncateIdentifier() 보호된 메소드

Truncate an identifier if needed and append a hash to ensure uniqueness.
protected truncateIdentifier ( string $identifier, integer $lengthLimit = null, string $hashSource = null ) : string
$identifier string
$lengthLimit integer
$hashSource string
리턴 string

프로퍼티 상세

$classNames 보호되어 있는 프로퍼티

protected array $classNames
리턴 array

$entityManager 보호되어 있는 프로퍼티

protected ObjectManager,Doctrine\Common\Persistence $entityManager
리턴 Doctrine\Common\Persistence\ObjectManager

$reader 보호되어 있는 프로퍼티

protected AnnotationReader,Doctrine\Common\Annotations $reader
리턴 Doctrine\Common\Annotations\AnnotationReader

$reflectionService 보호되어 있는 프로퍼티

protected ReflectionService,Neos\Flow\Reflection $reflectionService
리턴 Neos\Flow\Reflection\ReflectionService

$tableNameLengthLimit 보호되어 있는 프로퍼티

protected int $tableNameLengthLimit
리턴 integer