프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$childClasses | array | If empty then any classes are permitted. | |
$childMappings | array | READ-ONLY: The child mappings of the class. | |
$childrenMappings | array | READ-ONLY: The children mappings of the class. | |
$customRepositoryClassName | string | (Optional). | |
$depthMapping | string | READ-ONLY: Name of the depth property | |
$fieldMappings | array | READ-ONLY: The field mappings of the class. | |
$idGenerator | READ-ONLY: The ID generator used for generating IDs for this class. | ||
$identifier | READ-ONLY: The field name of the document identifier. | ||
$inheritMixins | boolean | READ-ONLY: Inherit parent class' mixins (default) or not | |
$isLeaf | boolean | READ-ONLY: If the document should be act as a leaf-node and therefore not be allowed children. | |
$isMappedSuperclass | boolean | READ-ONLY: Whether this class describes the mapping of a mapped superclass. | |
$lifecycleCallbacks | array | READ-ONLY: The registered lifecycle callbacks for documents of this class. | |
$localeMapping | string | READ-ONLY: Name of the locale property | |
$mappings | array | Keys are field names and values are mapping definitions. The mapping definition array has the following values: - fieldName (string) The name of the field in the Document. - id (boolean, optional) Marks the field as the primary key of the document. | |
$mixedReferrersMappings | array | READ-ONLY: The mixed referrers (read only) mappings of the class. | |
$mixins | array | READ-ONLY: The JCR Mixins to be used for this node (including inherited mixins) | |
$name | READ-ONLY: The name of the document class that is stored in the phpcr:class property | ||
$namespace | string | READ-ONLY: The namespace the document class is contained in. | |
$node | string | READ-ONLY: The field name of the node | |
$nodeType | string | READ-ONLY: The JCR Nodetype to be used for this node | |
$nodename | string | READ-ONLY except on document creation: The field name for the name of the node. | |
$parentClasses | array | READ-ONLY: Mapped parent classes. | |
$parentMapping | string | READ-ONLY except on document creation: The field name for the parent document. | |
$referenceMappings | array | READ-ONLY: The reference mappings of the class. | |
$referenceable | boolean | READ-ONLY: determines if the document is referenceable or not | |
$referrersMappings | array | READ-ONLY: The referrers mappings of the class. | |
$reflClass | ReflectionClass | The ReflectionClass instance of the mapped class. | |
$reflFields | ReflectionPropert\ReflectionProperty[] | READ-ONLY: The ReflectionProperty instances of the mapped class. | |
$translatableFields | array | READ-ONLY: List of translatable fields | |
$translator | string | This is the key used for DocumentManagerInterface::getTranslationStrategy | |
$uniqueNodeType | boolean | READ-ONLY: If true, consider this document's node type to be unique among all mappings. | |
$uuidFieldName | READ-ONLY: The field name of the UUID field | ||
$versionCreatedField | string | READ-ONLY: Name of the version created property of this document | |
$versionNameField | string | READ-ONLY: Name of the version name property of this document | |
$versionable | boolean | string | READ-ONLY: Whether this document should be versioned. If this is not false, it will be one of the values from self::validVersionableAnnotations |
프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$validVersionableAnnotations |
메소드 | 설명 | |
---|---|---|
__construct ( string $className ) | Initializes a new ClassMetadata instance that will hold the object-document mapping metadata of the class with the given name. | |
__sleep ( ) : array | Determines which fields get serialized. | |
addLifecycleCallback ( string $callback, string $event ) | Adds a lifecycle callback for documents of this class. | |
assertValidChildClass ( |
Assert that the given class FQN can be a child of the document this metadata represents. | |
fullyQualifiedClassName ( string $className ) : string | ||
getAssociation ( $fieldName ) : array | ||
getAssociationMappedByTargetField ( $assocName ) | {@inheritDoc} | |
getAssociationNames ( ) | {@inheritDoc} | |
getAssociationTargetClass ( $fieldName ) | {@inheritDoc} | |
getChildClasses ( ) : string[] | Return the class names or interfaces that children of this document must be an instance of. | |
getField ( $fieldName ) | {@inheritDoc} | |
getFieldMapping ( string $fieldName ) : array | Gets the mapping of a (regular) field that holds some data but not a reference to another object. | |
getFieldNames ( ) | {@inheritDoc} | |
getFieldValue ( object $document, string $field ) : mixed | null | Gets the specified field's value off the given document. | |
getIdentifier ( ) | {@inheritDoc} | |
getIdentifierFieldNames ( ) : array | Get identifier field names of this class. | |
getIdentifierValue ( object $document ) : string | Gets the document identifier. | |
getIdentifierValues ( object $document ) : array | Get identifier values of this document. | |
getInheritMixins ( ) : boolean | Return whether to inherit mixins from parent | |
getLifecycleCallbacks ( string $event ) : array | Gets the registered lifecycle callbacks for an event. | |
getMixins ( ) : array | Return the JCR mixins to be used for this node. | |
getName ( ) | {@inheritDoc} | |
getNamespace ( ) : string | The namespace this Document class belongs to. | |
getNodeType ( ) : string | Return the JCR node type to be used for this node. | |
getParentClasses ( ) : array | Return the mapped parent classes | |
getReflectionClass ( ) | {@inheritDoc} | |
getReflectionProperties ( ) : array | Gets the ReflectionProperties of the mapped class. | |
getReflectionProperty ( string $name ) : ReflectionProperty | Gets a ReflectionProperty for a specific field of the mapped class. | |
getTypeOfField ( $fieldName ) | {@inheritDoc} | |
getUuidFieldName ( ) | ||
hasAssociation ( $fieldName ) | {@inheritDoc} | |
hasField ( $fieldName ) | {@inheritDoc} | |
hasLifecycleCallbacks ( string $lifecycleEvent ) : boolean | Whether the class has any attached lifecycle listeners or callbacks for a lifecycle event. | |
hasUniqueNodeType ( ) : boolean | Return true if this document has a unique node type among all mappings. | |
initializeReflection ( Doctrine\Common\Persistence\Mapping\ReflectionService $reflService ) | Initializes a new ClassMetadata instance that will hold the object-relational mapping metadata of the class with the given name. | |
invokeLifecycleCallbacks ( string $lifecycleEvent, object $document, array $arguments = null ) | Dispatches the lifecycle event of the given document to the registered lifecycle callbacks and lifecycle listeners. | |
isAssociationInverseSide ( $assocName ) | {@inheritDoc} | |
isCollectionValuedAssociation ( $fieldName ) | {@inheritDoc} | |
isIdGeneratorNone ( ) : boolean | Checks whether the class uses no id generator. | |
isIdGeneratorRepository ( ) : boolean | Checks whether the class will generate an id via the repository. | |
isIdentifier ( $fieldName ) | {@inheritDoc} | |
isInheritedField ( $fieldName ) : boolean | Checks whether a mapped field is inherited from an entity superclass. | |
isLeaf ( ) : boolean | Return true if this is designated as a leaf node. | |
isNullable ( string $fieldName ) : boolean | Check if the field is nullable or not. | |
isSingleValuedAssociation ( $fieldName ) | {@inheritDoc} | |
isUuid ( string $fieldName ) : boolean | Whether $fieldName is the universally unique identifier of the document. | |
isValidNodename ( string $nodeName ) : PHPCR\RepositoryException | null | Check if this node name is valid. Returns null if valid, an exception otherwise. | |
mapChild ( array $mapping, |
||
mapChildren ( array $mapping, |
||
mapDepth ( array $mapping, |
||
mapField ( array $mapping, |
Map a field. | |
mapId ( array $mapping, |
||
mapLifecycleCallbacks ( array $mapping ) | ||
mapLocale ( array $mapping, |
||
mapManyToMany ( $mapping, |
||
mapManyToOne ( $mapping, |
||
mapMixedReferrers ( array $mapping, |
||
mapNode ( array $mapping, |
||
mapNodename ( array $mapping, |
||
mapParentDocument ( array $mapping, |
||
mapReferrers ( array $mapping, |
||
mapVersionCreated ( array $mapping, |
||
mapVersionName ( array $mapping, |
||
newInstance ( ) : object | Creates a new instance of the mapped class, without invoking the constructor. | |
setChildClasses ( array $childClasses ) | Set the class names or interfaces that children of this document must be instance of. | |
setCustomRepositoryClassName ( string $repositoryClassName ) | Registers a custom repository class for the document class. | |
setFieldValue ( object $document, string $field, mixed $value ) | Sets the specified field to the specified value on the given document. | |
setIdentifier ( string $identifier ) | INTERNAL: Sets the mapped identifier field of this class. | |
setIdentifierValue ( object $document, mixed $id ) | Sets the document identifier of a document. | |
setInheritMixins ( boolean $inheritMixins ) | Set whether to inherit mixins from parent | |
setIsLeaf ( boolean $isLeaf ) | Set if this document should act as a leaf node. | |
setLifecycleCallbacks ( array $callbacks ) | Sets the lifecycle callbacks for documents of this class. | |
setMixins ( array $mixins ) | Set the JCR mixins | |
setNodeType ( string $nodeType ) | ||
setParentClasses ( array $parentClasses ) | Set the mapped parent classes | |
setReferenceable ( boolean $referenceable ) | ||
setTranslator ( $translator ) | Sets the translator strategy key | |
setUniqueNodeType ( boolean $uniqueNodeType ) | ||
setVersioned ( string | boolean $versionable ) | ||
validateChildClasses ( ) | Validate that childClasses is empty if isLeaf is true. | |
validateClassMapping ( ) | Finalize the mapping and make sure that it is consistent. | |
validateIdentifier ( ) | Validate Identifier mapping, determine the strategy if none is explicitly set. | |
validateLifecycleCallbacks ( Doctrine\Common\Persistence\Mapping\ReflectionService $reflService ) | Validate lifecycle callbacks | |
validateReferenceable ( ) | Validate whether this class needs to be referenceable. | |
validateReferences ( ) | Validate association targets actually exist. | |
validateTranslatables ( ) | Validate translatable fields - ensure that the document has a translator strategy in place. | |
wakeupReflection ( Doctrine\Common\Persistence\Mapping\ReflectionService $reflService ) | Restores some state that can not be serialized/unserialized. |
메소드 | 설명 | |
---|---|---|
setIdGenerator ( string $generator ) | Sets the ID generator used to generate IDs for instances of this class. | |
validateAndCompleteAssociationMapping ( $mapping, |
||
validateAndCompleteFieldMapping ( array $mapping, |
메소드 | 설명 | |
---|---|---|
determineIdStrategy ( ) | Determine the id strategy for this document. Only call this if no explicit strategy was assigned. |
public __construct ( string $className ) | ||
$className | string | The name of the document class the new instance is used for. |
public addLifecycleCallback ( string $callback, string $event ) | ||
$callback | string | |
$event | string |
public assertValidChildClass ( |
||
$class |
public fullyQualifiedClassName ( string $className ) : string | ||
$className | string | |
리턴 | string |
public getAssociation ( $fieldName ) : array | ||
리턴 | array | the association mapping with the field of this name |
public getAssociationMappedByTargetField ( $assocName ) |
public getChildClasses ( ) : string[] | ||
리턴 | string[] |
public getFieldMapping ( string $fieldName ) : array | ||
$fieldName | string | The field name. |
리턴 | array | The field mapping. |
public getIdentifierFieldNames ( ) : array | ||
리턴 | array |
public getIdentifierValue ( object $document ) : string | ||
$document | object | |
리턴 | string | $id |
public getIdentifierValues ( object $document ) : array | ||
$document | object | |
리턴 | array |
public getInheritMixins ( ) : boolean | ||
리턴 | boolean |
public getLifecycleCallbacks ( string $event ) : array | ||
$event | string | |
리턴 | array |
public getNamespace ( ) : string | ||
리턴 | string | $namespace The namespace name. |
public getNodeType ( ) : string | ||
리턴 | string |
public getParentClasses ( ) : array | ||
리턴 | array | of mapped class FQNs |
public getReflectionProperties ( ) : array | ||
리턴 | array | An array of \ReflectionProperty instances. |
public getReflectionProperty ( string $name ) : ReflectionProperty | ||
$name | string | |
리턴 | ReflectionProperty |
public hasLifecycleCallbacks ( string $lifecycleEvent ) : boolean | ||
$lifecycleEvent | string | |
리턴 | boolean |
public hasUniqueNodeType ( ) : boolean | ||
리턴 | boolean |
public initializeReflection ( Doctrine\Common\Persistence\Mapping\ReflectionService $reflService ) | ||
$reflService | Doctrine\Common\Persistence\Mapping\ReflectionService |
public isCollectionValuedAssociation ( $fieldName ) |
public isIdGeneratorNone ( ) : boolean | ||
리턴 | boolean | TRUE if the class does not use any id generator, FALSE otherwise. |
public isIdGeneratorRepository ( ) : boolean | ||
리턴 | boolean | TRUE if the class uses the Repository generator, FALSE otherwise. |
public isInheritedField ( $fieldName ) : boolean | ||
리턴 | boolean | string class name if the field is inherited, FALSE otherwise. |
public isNullable ( string $fieldName ) : boolean | ||
$fieldName | string | The field name |
리턴 | boolean | TRUE if the field is nullable, FALSE otherwise. |
public isValidNodename ( string $nodeName ) : PHPCR\RepositoryException | null | ||
$nodeName | string | The node local name |
리턴 | PHPCR\RepositoryException | null |
public mapChildren ( array $mapping, |
||
$mapping | array | |
$inherited |
public mapManyToMany ( $mapping, |
||
$inherited |
public mapManyToOne ( $mapping, |
||
$inherited |
public mapMixedReferrers ( array $mapping, |
||
$mapping | array | |
$inherited |
public mapNodename ( array $mapping, |
||
$mapping | array | |
$inherited |
public mapParentDocument ( array $mapping, |
||
$mapping | array | |
$inherited |
public mapReferrers ( array $mapping, |
||
$mapping | array | |
$inherited |
public mapVersionCreated ( array $mapping, |
||
$mapping | array | |
$inherited |
public mapVersionName ( array $mapping, |
||
$mapping | array | |
$inherited |
public newInstance ( ) : object | ||
리턴 | object |
public setChildClasses ( array $childClasses ) | ||
$childClasses | array |
public setCustomRepositoryClassName ( string $repositoryClassName ) | ||
$repositoryClassName | string | The class name of the custom repository. |
protected setIdGenerator ( string $generator ) | ||
$generator | string |
public setIdentifier ( string $identifier ) | ||
$identifier | string |
public setIdentifierValue ( object $document, mixed $id ) | ||
$document | object | |
$id | mixed |
public setInheritMixins ( boolean $inheritMixins ) | ||
$inheritMixins | boolean |
public setLifecycleCallbacks ( array $callbacks ) | ||
$callbacks | array |
public setParentClasses ( array $parentClasses ) | ||
$parentClasses | array |
public setUniqueNodeType ( boolean $uniqueNodeType ) | ||
$uniqueNodeType | boolean |
public setVersioned ( string | boolean $versionable ) | ||
$versionable | string | boolean | A valid versionable annotation or false to disable versioning. |
protected validateAndCompleteAssociationMapping ( $mapping, |
||
$inherited |
protected validateAndCompleteFieldMapping ( array $mapping, |
||
$mapping | array | |
$inherited | same field of parent document, if any | |
$isField | boolean | whether this is a field or an association |
$phpcrLabel | string | the name for the phpcr thing. usually property, except for child where this is name. referrers use false to not set anything. |
리턴 | mixed |
public validateChildClasses ( ) |
public validateClassMapping ( ) |
public validateIdentifier ( ) |
public validateLifecycleCallbacks ( Doctrine\Common\Persistence\Mapping\ReflectionService $reflService ) | ||
$reflService | Doctrine\Common\Persistence\Mapping\ReflectionService |
public validateReferenceable ( ) |
public validateReferences ( ) |
public validateTranslatables ( ) |
public wakeupReflection ( Doctrine\Common\Persistence\Mapping\ReflectionService $reflService ) | ||
$reflService | Doctrine\Common\Persistence\Mapping\ReflectionService |
public array $childClasses | ||
리턴 | array |
public array $childMappings | ||
리턴 | array |
public array $childrenMappings | ||
리턴 | array |
public string $customRepositoryClassName | ||
리턴 | string |
public string $depthMapping | ||
리턴 | string |
public array $fieldMappings | ||
리턴 | array |
public $idGenerator |
public bool $inheritMixins | ||
리턴 | boolean |
public bool $isLeaf | ||
리턴 | boolean |
public bool $isMappedSuperclass | ||
리턴 | boolean |
public array $lifecycleCallbacks | ||
리턴 | array |
public string $localeMapping | ||
리턴 | string |
public array $mappings | ||
리턴 | array |
public array $mixedReferrersMappings | ||
리턴 | array |
public array $mixins | ||
리턴 | array |
public $name |
public string $namespace | ||
리턴 | string |
public string $nodeType | ||
리턴 | string |
public string $nodename | ||
리턴 | string |
public string $parentMapping | ||
리턴 | string |
public array $referenceMappings | ||
리턴 | array |
public bool $referenceable | ||
리턴 | boolean |
public array $referrersMappings | ||
리턴 | array |
public ReflectionClass $reflClass | ||
리턴 | ReflectionClass |
public ReflectionProperty[],ReflectionPropert $reflFields | ||
리턴 | ReflectionPropert\ReflectionProperty[] |
public array $translatableFields | ||
리턴 | array |
public string $translator | ||
리턴 | string |
public bool $uniqueNodeType | ||
리턴 | boolean |
public string $versionCreatedField | ||
리턴 | string |
public string $versionNameField | ||
리턴 | string |