PHP Class Doctrine\ODM\PHPCR\Mapping\ClassMetadata

Since: 1.0
Author: Benjamin Eberlei ([email protected])
Author: Lukas Kahwe Smith ([email protected])
Author: Jonathan H. Wage ([email protected])
Author: Roman Borschel ([email protected])
Author: David Buchmann ([email protected])
Author: Daniel Barsotti ([email protected])
Inheritance: implements Doctrine\Common\Persistence\Mapping\ClassMetadata
Datei anzeigen Open project: doctrine/phpcr-odm Class Usage Examples

Public Properties

Property 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

Protected Properties

Property Type Description
$validVersionableAnnotations

Public Methods

Method 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 ( ClassMetadata $class ) 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, ClassMetadata $inherited = null )
mapChildren ( array $mapping, ClassMetadata $inherited = null )
mapDepth ( array $mapping, ClassMetadata $inherited = null )
mapField ( array $mapping, ClassMetadata $inherited = null ) Map a field.
mapId ( array $mapping, ClassMetadata $inherited = null )
mapLifecycleCallbacks ( array $mapping )
mapLocale ( array $mapping, ClassMetadata $inherited = null )
mapManyToMany ( $mapping, ClassMetadata $inherited = null )
mapManyToOne ( $mapping, ClassMetadata $inherited = null )
mapMixedReferrers ( array $mapping, ClassMetadata $inherited = null )
mapNode ( array $mapping, ClassMetadata $inherited = null )
mapNodename ( array $mapping, ClassMetadata $inherited = null )
mapParentDocument ( array $mapping, ClassMetadata $inherited = null )
mapReferrers ( array $mapping, ClassMetadata $inherited = null )
mapVersionCreated ( array $mapping, ClassMetadata $inherited = null )
mapVersionName ( array $mapping, ClassMetadata $inherited = null )
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.

Protected Methods

Method Description
setIdGenerator ( string $generator ) Sets the ID generator used to generate IDs for instances of this class.
validateAndCompleteAssociationMapping ( $mapping, ClassMetadata $inherited = null, $phpcrLabel = 'property' )
validateAndCompleteFieldMapping ( array $mapping, ClassMetadata $inherited = null, boolean $isField = true, string $phpcrLabel = 'property' ) : mixed

Private Methods

Method Description
determineIdStrategy ( ) Determine the id strategy for this document. Only call this if no explicit strategy was assigned.

Method Details

__construct() public method

Initializes a new ClassMetadata instance that will hold the object-document mapping metadata of the class with the given name.
public __construct ( string $className )
$className string The name of the document class the new instance is used for.

__sleep() public method

It is only serialized what is necessary for best unserialization performance. That means any metadata properties that are not set or empty or simply have their default value are NOT serialized. Parts that are also NOT serialized because they can not be properly unserialized: - reflClass (ReflectionClass) - reflFields (ReflectionProperty array)
public __sleep ( ) : array
return array The names of all the fields that should be serialized.

addLifecycleCallback() public method

Note: If the same callback is registered more than once, the old one will be overridden.
public addLifecycleCallback ( string $callback, string $event )
$callback string
$event string

assertValidChildClass() public method

Assert that the given class FQN can be a child of the document this metadata represents.
public assertValidChildClass ( ClassMetadata $class )
$class ClassMetadata

fullyQualifiedClassName() public method

public fullyQualifiedClassName ( string $className ) : string
$className string
return string

getAssociation() public method

public getAssociation ( $fieldName ) : array
return array the association mapping with the field of this name

getAssociationMappedByTargetField() public method

{@inheritDoc}
public getAssociationMappedByTargetField ( $assocName )

getAssociationNames() public method

{@inheritDoc}
public getAssociationNames ( )

getAssociationTargetClass() public method

{@inheritDoc}
public getAssociationTargetClass ( $fieldName )

getChildClasses() public method

Return the class names or interfaces that children of this document must be an instance of.
public getChildClasses ( ) : string[]
return string[]

getField() public method

{@inheritDoc}
Deprecation: use getFieldMapping instead
public getField ( $fieldName )

getFieldMapping() public method

Gets the mapping of a (regular) field that holds some data but not a reference to another object.
public getFieldMapping ( string $fieldName ) : array
$fieldName string The field name.
return array The field mapping.

getFieldNames() public method

{@inheritDoc}
public getFieldNames ( )

getFieldValue() public method

Gets the specified field's value off the given document.
public getFieldValue ( object $document, string $field ) : mixed | null
$document object the document to get the field from
$field string the name of the field
return mixed | null the value of this field for the document or null if not found

getIdentifier() public method

{@inheritDoc}
public getIdentifier ( )

getIdentifierFieldNames() public method

Since PHPCR only allows exactly one identifier field this is a proxy to {@see \getIdentifier()} and returns an array.
public getIdentifierFieldNames ( ) : array
return array

getIdentifierValue() public method

Gets the document identifier.
public getIdentifierValue ( object $document ) : string
$document object
return string $id

getIdentifierValues() public method

Since PHPCR only allows exactly one identifier field this is a proxy to {@see \getIdentifierValue()} and returns an array with the identifier field as a key. If there is no identifier mapped, returns an empty array as per the specification.
public getIdentifierValues ( object $document ) : array
$document object
return array

getInheritMixins() public method

Return whether to inherit mixins from parent
public getInheritMixins ( ) : boolean
return boolean

getLifecycleCallbacks() public method

Gets the registered lifecycle callbacks for an event.
public getLifecycleCallbacks ( string $event ) : array
$event string
return array

getMixins() public method

Return the JCR mixins to be used for this node.
public getMixins ( ) : array
return array

getName() public method

{@inheritDoc}
public getName ( )

getNamespace() public method

The namespace this Document class belongs to.
public getNamespace ( ) : string
return string $namespace The namespace name.

getNodeType() public method

Return the JCR node type to be used for this node.
public getNodeType ( ) : string
return string

getParentClasses() public method

Return the mapped parent classes
public getParentClasses ( ) : array
return array of mapped class FQNs

getReflectionClass() public method

{@inheritDoc}
public getReflectionClass ( )

getReflectionProperties() public method

Gets the ReflectionProperties of the mapped class.
public getReflectionProperties ( ) : array
return array An array of \ReflectionProperty instances.

getReflectionProperty() public method

Gets a ReflectionProperty for a specific field of the mapped class.
public getReflectionProperty ( string $name ) : ReflectionProperty
$name string
return ReflectionProperty

getTypeOfField() public method

{@inheritDoc}
public getTypeOfField ( $fieldName )

getUuidFieldName() public method

public getUuidFieldName ( )

hasAssociation() public method

{@inheritDoc}
public hasAssociation ( $fieldName )

hasField() public method

{@inheritDoc}
public hasField ( $fieldName )

hasLifecycleCallbacks() public method

Whether the class has any attached lifecycle listeners or callbacks for a lifecycle event.
public hasLifecycleCallbacks ( string $lifecycleEvent ) : boolean
$lifecycleEvent string
return boolean

hasUniqueNodeType() public method

Return true if this document has a unique node type among all mappings.
public hasUniqueNodeType ( ) : boolean
return boolean

initializeReflection() public method

Initializes a new ClassMetadata instance that will hold the object-relational mapping metadata of the class with the given name.
public initializeReflection ( Doctrine\Common\Persistence\Mapping\ReflectionService $reflService )
$reflService Doctrine\Common\Persistence\Mapping\ReflectionService

invokeLifecycleCallbacks() public method

Dispatches the lifecycle event of the given document to the registered lifecycle callbacks and lifecycle listeners.
public invokeLifecycleCallbacks ( string $lifecycleEvent, object $document, array $arguments = null )
$lifecycleEvent string The lifecycle event.
$document object The Document on which the event occurred.
$arguments array the arguments to pass to the callback

isAssociationInverseSide() public method

{@inheritDoc}
public isAssociationInverseSide ( $assocName )

isCollectionValuedAssociation() public method

{@inheritDoc}
public isCollectionValuedAssociation ( $fieldName )

isIdGeneratorNone() public method

Checks whether the class uses no id generator.
public isIdGeneratorNone ( ) : boolean
return boolean TRUE if the class does not use any id generator, FALSE otherwise.

isIdGeneratorRepository() public method

Checks whether the class will generate an id via the repository.
public isIdGeneratorRepository ( ) : boolean
return boolean TRUE if the class uses the Repository generator, FALSE otherwise.

isIdentifier() public method

{@inheritDoc}
public isIdentifier ( $fieldName )

isInheritedField() public method

Checks whether a mapped field is inherited from an entity superclass.
public isInheritedField ( $fieldName ) : boolean
return boolean string class name if the field is inherited, FALSE otherwise.

isLeaf() public method

Return true if this is designated as a leaf node.
public isLeaf ( ) : boolean
return boolean

isNullable() public method

Check if the field is nullable or not.
public isNullable ( string $fieldName ) : boolean
$fieldName string The field name
return boolean TRUE if the field is nullable, FALSE otherwise.

isSingleValuedAssociation() public method

{@inheritDoc}
public isSingleValuedAssociation ( $fieldName )

isUuid() public method

Whether $fieldName is the universally unique identifier of the document.
public isUuid ( string $fieldName ) : boolean
$fieldName string
return boolean True if $fieldName is mapped as the uuid, false otherwise.

isValidNodename() public method

Check if this node name is valid. Returns null if valid, an exception otherwise.
public isValidNodename ( string $nodeName ) : PHPCR\RepositoryException | null
$nodeName string The node local name
return PHPCR\RepositoryException | null

mapChild() public method

public mapChild ( array $mapping, ClassMetadata $inherited = null )
$mapping array
$inherited ClassMetadata

mapChildren() public method

public mapChildren ( array $mapping, ClassMetadata $inherited = null )
$mapping array
$inherited ClassMetadata

mapDepth() public method

public mapDepth ( array $mapping, ClassMetadata $inherited = null )
$mapping array
$inherited ClassMetadata

mapField() public method

- type - The Doctrine Type of this field. - fieldName - The name of the property/field on the mapped php class - name - The Property key of this field in the PHPCR document - id - True for an ID field.
public mapField ( array $mapping, ClassMetadata $inherited = null )
$mapping array The mapping information.
$inherited ClassMetadata

mapId() public method

public mapId ( array $mapping, ClassMetadata $inherited = null )
$mapping array
$inherited ClassMetadata

mapLifecycleCallbacks() public method

public mapLifecycleCallbacks ( array $mapping )
$mapping array

mapLocale() public method

public mapLocale ( array $mapping, ClassMetadata $inherited = null )
$mapping array
$inherited ClassMetadata

mapManyToMany() public method

public mapManyToMany ( $mapping, ClassMetadata $inherited = null )
$inherited ClassMetadata

mapManyToOne() public method

public mapManyToOne ( $mapping, ClassMetadata $inherited = null )
$inherited ClassMetadata

mapMixedReferrers() public method

public mapMixedReferrers ( array $mapping, ClassMetadata $inherited = null )
$mapping array
$inherited ClassMetadata

mapNode() public method

public mapNode ( array $mapping, ClassMetadata $inherited = null )
$mapping array
$inherited ClassMetadata

mapNodename() public method

public mapNodename ( array $mapping, ClassMetadata $inherited = null )
$mapping array
$inherited ClassMetadata

mapParentDocument() public method

public mapParentDocument ( array $mapping, ClassMetadata $inherited = null )
$mapping array
$inherited ClassMetadata

mapReferrers() public method

public mapReferrers ( array $mapping, ClassMetadata $inherited = null )
$mapping array
$inherited ClassMetadata

mapVersionCreated() public method

public mapVersionCreated ( array $mapping, ClassMetadata $inherited = null )
$mapping array
$inherited ClassMetadata

mapVersionName() public method

public mapVersionName ( array $mapping, ClassMetadata $inherited = null )
$mapping array
$inherited ClassMetadata

newInstance() public method

Creates a new instance of the mapped class, without invoking the constructor.
public newInstance ( ) : object
return object

setChildClasses() public method

Set the class names or interfaces that children of this document must be instance of.
public setChildClasses ( array $childClasses )
$childClasses array

setCustomRepositoryClassName() public method

Registers a custom repository class for the document class.
public setCustomRepositoryClassName ( string $repositoryClassName )
$repositoryClassName string The class name of the custom repository.

setFieldValue() public method

Sets the specified field to the specified value on the given document.
public setFieldValue ( object $document, string $field, mixed $value )
$document object
$field string
$value mixed

setIdGenerator() protected method

Sets the ID generator used to generate IDs for instances of this class.
protected setIdGenerator ( string $generator )
$generator string

setIdentifier() public method

INTERNAL: Sets the mapped identifier field of this class.
public setIdentifier ( string $identifier )
$identifier string

setIdentifierValue() public method

Sets the document identifier of a document.
public setIdentifierValue ( object $document, mixed $id )
$document object
$id mixed

setInheritMixins() public method

Set whether to inherit mixins from parent
public setInheritMixins ( boolean $inheritMixins )
$inheritMixins boolean

setIsLeaf() public method

Set if this document should act as a leaf node.
public setIsLeaf ( boolean $isLeaf )
$isLeaf boolean

setLifecycleCallbacks() public method

Any previously registered callbacks are overwritten.
public setLifecycleCallbacks ( array $callbacks )
$callbacks array

setMixins() public method

Set the JCR mixins
public setMixins ( array $mixins )
$mixins array

setNodeType() public method

public setNodeType ( string $nodeType )
$nodeType string

setParentClasses() public method

Set the mapped parent classes
public setParentClasses ( array $parentClasses )
$parentClasses array

setReferenceable() public method

public setReferenceable ( boolean $referenceable )
$referenceable boolean

setTranslator() public method

Sets the translator strategy key
public setTranslator ( $translator )

setUniqueNodeType() public method

public setUniqueNodeType ( boolean $uniqueNodeType )
$uniqueNodeType boolean

setVersioned() public method

public setVersioned ( string | boolean $versionable )
$versionable string | boolean A valid versionable annotation or false to disable versioning.

validateAndCompleteAssociationMapping() protected method

protected validateAndCompleteAssociationMapping ( $mapping, ClassMetadata $inherited = null, $phpcrLabel = 'property' )
$inherited ClassMetadata

validateAndCompleteFieldMapping() protected method

protected validateAndCompleteFieldMapping ( array $mapping, ClassMetadata $inherited = null, boolean $isField = true, string $phpcrLabel = 'property' ) : mixed
$mapping array
$inherited ClassMetadata 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.
return mixed

validateChildClasses() public method

Validate that childClasses is empty if isLeaf is true.

validateClassMapping() public method

Finalize the mapping and make sure that it is consistent.

validateIdentifier() public method

Validate Identifier mapping, determine the strategy if none is explicitly set.
public validateIdentifier ( )

validateLifecycleCallbacks() public method

Validate lifecycle callbacks
public validateLifecycleCallbacks ( Doctrine\Common\Persistence\Mapping\ReflectionService $reflService )
$reflService Doctrine\Common\Persistence\Mapping\ReflectionService

validateReferenceable() public method

The document needs to be either referenceable or full versionable. Simple versioning does not imply referenceable.

validateReferences() public method

Validate association targets actually exist.
public validateReferences ( )

validateTranslatables() public method

Validate translatable fields - ensure that the document has a translator strategy in place.

wakeupReflection() public method

Restores some state that can not be serialized/unserialized.
public wakeupReflection ( Doctrine\Common\Persistence\Mapping\ReflectionService $reflService )
$reflService Doctrine\Common\Persistence\Mapping\ReflectionService

Property Details

$childClasses public_oe property

If empty then any classes are permitted.
public array $childClasses
return array

$childMappings public_oe property

READ-ONLY: The child mappings of the class.
public array $childMappings
return array

$childrenMappings public_oe property

READ-ONLY: The children mappings of the class.
public array $childrenMappings
return array

$customRepositoryClassName public_oe property

(Optional).
public string $customRepositoryClassName
return string

$depthMapping public_oe property

READ-ONLY: Name of the depth property
public string $depthMapping
return string

$fieldMappings public_oe property

READ-ONLY: The field mappings of the class.
public array $fieldMappings
return array

$idGenerator public_oe property

READ-ONLY: The ID generator used for generating IDs for this class.
public $idGenerator

$identifier public_oe property

READ-ONLY: The field name of the document identifier.
public $identifier

$inheritMixins public_oe property

READ-ONLY: Inherit parent class' mixins (default) or not
public bool $inheritMixins
return boolean

$isLeaf public_oe property

READ-ONLY: If the document should be act as a leaf-node and therefore not be allowed children.
public bool $isLeaf
return boolean

$isMappedSuperclass public_oe property

READ-ONLY: Whether this class describes the mapping of a mapped superclass.
public bool $isMappedSuperclass
return boolean

$lifecycleCallbacks public_oe property

READ-ONLY: The registered lifecycle callbacks for documents of this class.
public array $lifecycleCallbacks
return array

$localeMapping public_oe property

READ-ONLY: Name of the locale property
public string $localeMapping
return string

$mappings public_oe property

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.
public array $mappings
return array

$mixedReferrersMappings public_oe property

READ-ONLY: The mixed referrers (read only) mappings of the class.
public array $mixedReferrersMappings
return array

$mixins public_oe property

READ-ONLY: The JCR Mixins to be used for this node (including inherited mixins)
public array $mixins
return array

$name public_oe property

READ-ONLY: The name of the document class that is stored in the phpcr:class property
public $name

$namespace public_oe property

READ-ONLY: The namespace the document class is contained in.
public string $namespace
return string

$node public_oe property

READ-ONLY: The field name of the node
public string $node
return string

$nodeType public_oe property

READ-ONLY: The JCR Nodetype to be used for this node
public string $nodeType
return string

$nodename public_oe property

READ-ONLY except on document creation: The field name for the name of the node.
public string $nodename
return string

$parentClasses public_oe property

READ-ONLY: Mapped parent classes.
public array $parentClasses
return array

$parentMapping public_oe property

READ-ONLY except on document creation: The field name for the parent document.
public string $parentMapping
return string

$referenceMappings public_oe property

READ-ONLY: The reference mappings of the class.
public array $referenceMappings
return array

$referenceable public_oe property

READ-ONLY: determines if the document is referenceable or not
public bool $referenceable
return boolean

$referrersMappings public_oe property

READ-ONLY: The referrers mappings of the class.
public array $referrersMappings
return array

$reflClass public_oe property

The ReflectionClass instance of the mapped class.
public ReflectionClass $reflClass
return ReflectionClass

$reflFields public_oe property

READ-ONLY: The ReflectionProperty instances of the mapped class.
public ReflectionProperty[],ReflectionPropert $reflFields
return ReflectionPropert\ReflectionProperty[]

$translatableFields public_oe property

READ-ONLY: List of translatable fields
public array $translatableFields
return array

$translator public_oe property

This is the key used for DocumentManagerInterface::getTranslationStrategy
public string $translator
return string

$uniqueNodeType public_oe property

READ-ONLY: If true, consider this document's node type to be unique among all mappings.
public bool $uniqueNodeType
return boolean

$uuidFieldName public_oe property

READ-ONLY: The field name of the UUID field
public $uuidFieldName

$validVersionableAnnotations protected_oe static_oe property

protected static $validVersionableAnnotations

$versionCreatedField public_oe property

READ-ONLY: Name of the version created property of this document
public string $versionCreatedField
return string

$versionNameField public_oe property

READ-ONLY: Name of the version name property of this document
public string $versionNameField
return string

$versionable public_oe property

READ-ONLY: Whether this document should be versioned. If this is not false, it will be one of the values from self::validVersionableAnnotations
public bool|string $versionable
return boolean | string