Свойство | Type | Description | |
---|---|---|---|
$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 |
Свойство | Type | Description | |
---|---|---|---|
$validVersionableAnnotations |
Méthode | Description | |
---|---|---|
__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. |
Méthode | Description | |
---|---|---|
setIdGenerator ( string $generator ) | Sets the ID generator used to generate IDs for instances of this class. | |
validateAndCompleteAssociationMapping ( $mapping, |
||
validateAndCompleteFieldMapping ( array $mapping, |
Méthode | Description | |
---|---|---|
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 | |
Résultat | string |
public getAssociation ( $fieldName ) : array | ||
Résultat | array | the association mapping with the field of this name |
public getAssociationMappedByTargetField ( $assocName ) |
public getAssociationTargetClass ( $fieldName ) |
public getChildClasses ( ) : string[] | ||
Résultat | string[] |
public getFieldMapping ( string $fieldName ) : array | ||
$fieldName | string | The field name. |
Résultat | array | The field mapping. |
public getIdentifierFieldNames ( ) : array | ||
Résultat | array |
public getIdentifierValue ( object $document ) : string | ||
$document | object | |
Résultat | string | $id |
public getIdentifierValues ( object $document ) : array | ||
$document | object | |
Résultat | array |
public getInheritMixins ( ) : boolean | ||
Résultat | boolean |
public getLifecycleCallbacks ( string $event ) : array | ||
$event | string | |
Résultat | array |
public getNamespace ( ) : string | ||
Résultat | string | $namespace The namespace name. |
public getNodeType ( ) : string | ||
Résultat | string |
public getParentClasses ( ) : array | ||
Résultat | array | of mapped class FQNs |
public getReflectionProperties ( ) : array | ||
Résultat | array | An array of \ReflectionProperty instances. |
public getReflectionProperty ( string $name ) : ReflectionProperty | ||
$name | string | |
Résultat | ReflectionProperty |
public hasLifecycleCallbacks ( string $lifecycleEvent ) : boolean | ||
$lifecycleEvent | string | |
Résultat | boolean |
public hasUniqueNodeType ( ) : boolean | ||
Résultat | boolean |
public initializeReflection ( Doctrine\Common\Persistence\Mapping\ReflectionService $reflService ) | ||
$reflService | Doctrine\Common\Persistence\Mapping\ReflectionService |
public isAssociationInverseSide ( $assocName ) |
public isCollectionValuedAssociation ( $fieldName ) |
public isIdGeneratorNone ( ) : boolean | ||
Résultat | boolean | TRUE if the class does not use any id generator, FALSE otherwise. |
public isIdGeneratorRepository ( ) : boolean | ||
Résultat | boolean | TRUE if the class uses the Repository generator, FALSE otherwise. |
public isInheritedField ( $fieldName ) : boolean | ||
Résultat | boolean | string class name if the field is inherited, FALSE otherwise. |
public isNullable ( string $fieldName ) : boolean | ||
$fieldName | string | The field name |
Résultat | boolean | TRUE if the field is nullable, FALSE otherwise. |
public isSingleValuedAssociation ( $fieldName ) |
public isValidNodename ( string $nodeName ) : PHPCR\RepositoryException | null | ||
$nodeName | string | The node local name |
Résultat | PHPCR\RepositoryException | null |
public mapChildren ( array $mapping, |
||
$mapping | array | |
$inherited |
public mapLifecycleCallbacks ( array $mapping ) | ||
$mapping | array |
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 | ||
Résultat | 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 setReferenceable ( boolean $referenceable ) | ||
$referenceable | boolean |
public setTranslator ( $translator ) |
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. |
Résultat | 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 | ||
Résultat | array |
public array $childMappings | ||
Résultat | array |
public array $childrenMappings | ||
Résultat | array |
public string $customRepositoryClassName | ||
Résultat | string |
public string $depthMapping | ||
Résultat | string |
public array $fieldMappings | ||
Résultat | array |
public $idGenerator |
public $identifier |
public bool $inheritMixins | ||
Résultat | boolean |
public bool $isLeaf | ||
Résultat | boolean |
public bool $isMappedSuperclass | ||
Résultat | boolean |
public array $lifecycleCallbacks | ||
Résultat | array |
public string $localeMapping | ||
Résultat | string |
public array $mappings | ||
Résultat | array |
public array $mixedReferrersMappings | ||
Résultat | array |
public array $mixins | ||
Résultat | array |
public $name |
public string $namespace | ||
Résultat | string |
public string $nodeType | ||
Résultat | string |
public string $nodename | ||
Résultat | string |
public array $parentClasses | ||
Résultat | array |
public string $parentMapping | ||
Résultat | string |
public array $referenceMappings | ||
Résultat | array |
public bool $referenceable | ||
Résultat | boolean |
public array $referrersMappings | ||
Résultat | array |
public ReflectionClass $reflClass | ||
Résultat | ReflectionClass |
public ReflectionProperty[],ReflectionPropert $reflFields | ||
Résultat | ReflectionPropert\ReflectionProperty[] |
public array $translatableFields | ||
Résultat | array |
public string $translator | ||
Résultat | string |
public bool $uniqueNodeType | ||
Résultat | boolean |
protected static $validVersionableAnnotations |
public string $versionCreatedField | ||
Résultat | string |
public string $versionNameField | ||
Résultat | string |