PHP 클래스 Doctrine\ODM\MongoDB\Mapping\ClassMetadataInfo

Once populated, ClassMetadata instances are usually cached in a serialized form. IMPORTANT NOTE: The fields of this class are only public for 2 reasons: 1) To allow fast READ access. 2) To drastically reduce the size of a serialized instance (private/protected members get the whole class name, namespace inclusive, prepended to every property in the serialized representation).
부터: 1.0
상속: implements Doctrine\Common\Persistence\Mapping\ClassMetadata
파일 보기 프로젝트 열기: doctrine/mongodb-odm 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$alsoLoadMethods array READ-ONLY: Array of fields to also load with a given method.
$associationMappings array Keys are field names and values are mapping definitions.
$changeTrackingPolicy integer READ-ONLY: The policy used for change-tracking on entities of this class.
$collection READ-ONLY: The name of the mongo collection the document is mapped to.
$collectionCapped READ-ONLY: If the collection should be a fixed size.
$collectionMax READ-ONLY: If the collection is fixed size, the maximum number of elements to store in the collection.
$collectionSize READ-ONLY: If the collection is fixed size, its size in bytes.
$customRepositoryClassName string (Optional).
$db READ-ONLY: The name of the mongo database the document is mapped to.
$defaultDiscriminatorValue string READ-ONLY: The default value for discriminatorField in case it's not set in the document
$discriminatorField string READ-ONLY: The definition of the discriminator field used in SINGLE_COLLECTION inheritance mapping.
$discriminatorMap mixed This does only apply to the SINGLE_COLLECTION inheritance mapping strategy where a discriminator field is used.
$discriminatorValue mixed This does only apply to the JOINED and SINGLE_COLLECTION inheritance mapping strategies where a discriminator field is used.
$distance READ-ONLY: The field that stores the calculated distance when performing geo spatial queries.
$fieldMappings 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. Multiple fields of an document can have the id attribute, forming a composite key.
$file READ-ONLY: The field that stores a file reference and indicates the document is a file and should be stored on the MongoGridFS.
$generatorOptions array READ-ONLY: The Id generator options.
$generatorType string READ-ONLY: The Id generator type used by the class.
$idGenerator Doctrine\ODM\MongoDB\Id\AbstractIdGenerator READ-ONLY: The ID generator used for generating IDs for this class.
$identifier READ-ONLY: The field name of the document identifier.
$indexes READ-ONLY: The array of indexes for the document collection.
$inheritanceType integer READ-ONLY: The inheritance mapping type used by the class.
$isEmbeddedDocument boolean READ-ONLY: Whether this class describes the mapping of a embedded document.
$isLockable boolean READ-ONLY: A flag for whether or not instances of this class are to allow pessimistic locking.
$isMappedSuperclass boolean READ-ONLY: Whether this class describes the mapping of a mapped superclass.
$isQueryResultDocument boolean READ-ONLY: Whether this class describes the mapping of an aggregation result document.
$isVersioned boolean READ-ONLY: A flag for whether or not instances of this class are to be versioned with optimistic locking.
$lifecycleCallbacks array READ-ONLY: The registered lifecycle callbacks for documents of this class.
$lockField mixed READ-ONLY: The name of the field which is used for locking a document.
$name READ-ONLY: The name of the document class.
$namespace string READ-ONLY: The namespace the document class is contained in.
$parentClasses array READ-ONLY: The names of the parent classes (ancestors).
$reflClass ReflectionClass The ReflectionClass instance of the mapped class.
$reflFields ReflectionProperty[] The ReflectionProperty instances of the mapped class.
$requireIndexes READ-ONLY: Whether or not queries on this document should require indexes.
$rootDocumentName string READ-ONLY: The name of the document class that is at the root of the mapped document inheritance hierarchy. If the document is not part of a mapped inheritance hierarchy this is the same as {@link $documentName}.
$shardKey READ-ONLY: Keys and options describing shard key. Only for sharded collections.
$slaveOkay READ-ONLY: Whether or not reads for this class are okay to read from a slave.
$subClasses array READ-ONLY: The names of all subclasses (descendants).
$versionField mixed READ-ONLY: The name of the field which is used for versioning in optimistic locking (if any).
$writeConcern READ-ONLY: Describes the level of acknowledgement requested from MongoDB for write operations.

공개 메소드들

메소드 설명
__construct ( string $documentName ) Initializes a new ClassMetadata instance that will hold the object-document mapping metadata of the class with the given name.
addIndex ( array $keys, array $options = [] ) Add a index for this Document.
addInheritedAssociationMapping ( array $mapping ) : void INTERNAL: Adds an association mapping without completing/validating it.
addInheritedFieldMapping ( array $fieldMapping ) INTERNAL: Adds a field mapping without completing/validating it.
addLifecycleCallback ( string $callback, string $event ) Adds a lifecycle callback for documents of this class.
getAssociationCollectionClass ( string $assocName ) Retrieve the collectionClass associated with an association
getAssociationMappedByTargetField ( $fieldName ) {@inheritDoc}
getAssociationNames ( ) {@inheritDoc}
getAssociationTargetClass ( $assocName ) {@inheritDoc}
getCollection ( ) : string Get the collection this Document is mapped to.
getCollectionCapped ( ) : boolean Get whether or not the documents collection is capped.
getCollectionMax ( ) : integer Get the collection max.
getCollectionSize ( ) : integer Get the collection size
getDatabase ( ) : string Returns the database this Document is mapped to.
getDatabaseIdentifierValue ( mixed $id ) : mixed Casts the identifier to its database type.
getDistance ( ) : string Returns the distance field name.
getEmbeddedFieldsMappings ( ) : array Gets mappings of fields holding embedded document(s).
getFieldMapping ( string $fieldName ) : array Gets the mapping of a field.
getFieldMappingByDbFieldName ( string $dbFieldName ) : array Gets the field mapping by its DB name.
getFieldNames ( ) {@inheritDoc}
getFieldValue ( object $document, string $field ) : mixed Gets the specified field's value off the given document.
getFile ( ) : string Returns the file field name.
getIdentifier ( ) {@inheritDoc}
getIdentifierFieldNames ( ) {@inheritDoc}
getIdentifierObject ( object $document ) : MongoId Get the document identifier object as a database type.
getIdentifierValue ( object $document ) : mixed Gets the document identifier as a PHP type.
getIdentifierValues ( $object ) {@inheritDoc}
getIndexes ( ) : array Returns the array of indexes for this Document.
getLifecycleCallbacks ( string $event ) : array Gets the registered lifecycle callbacks for an event.
getName ( ) {@inheritDoc}
getNamespace ( ) : string The namespace this Document class belongs to.
getPHPIdentifierValue ( mixed $id ) : mixed Casts the identifier to its portable PHP type.
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.
getShardKey ( ) : array
getTypeOfField ( $fieldName ) {@inheritDoc}
getWriteConcern ( ) : string
hasAssociation ( $fieldName ) {@inheritDoc}
hasDiscriminator ( ) : boolean Checks whether the document has a discriminator field and value configured.
hasEmbed ( string $fieldName ) : boolean Checks whether the class has a mapped embed with the given field name.
hasField ( $fieldName ) {@inheritDoc}
hasIndexes ( ) : boolean Checks whether this document has indexes or not.
hasLifecycleCallbacks ( string $event ) : boolean Checks whether the class has callbacks registered for a lifecycle event.
hasReference ( string $fieldName ) : boolean Checks whether the class has a mapped association with the given field name.
hasWriteConcern ( ) : boolean Whether there is a write concern configured for this class.
invokeLifecycleCallbacks ( string $event, object $document, array $arguments = null ) Dispatches the lifecycle event of the given document by invoking all registered callbacks.
isAssociationInverseSide ( $fieldName ) {@inheritDoc}
isChangeTrackingDeferredExplicit ( ) : boolean Whether the change tracking policy of this class is "deferred explicit".
isChangeTrackingDeferredImplicit ( ) : boolean Whether the change tracking policy of this class is "deferred implicit".
isChangeTrackingNotify ( ) : boolean Whether the change tracking policy of this class is "notify".
isCollectionValuedAssociation ( $fieldName ) {@inheritDoc}
isCollectionValuedEmbed ( string $fieldName ) : boolean Checks whether the class has a mapped embedded document for the specified field and if yes, checks whether it is a collection-valued association (to-many).
isCollectionValuedReference ( string $fieldName ) : boolean Checks whether the class has a mapped association for the specified field and if yes, checks whether it is a collection-valued association (to-many).
isFile ( ) : boolean Returns TRUE if this Document is a file to be stored on the MongoGridFS FALSE otherwise.
isIdGeneratorAuto ( ) : boolean Checks whether the class will generate a new \MongoId instance for us.
isIdGeneratorIncrement ( ) : boolean Checks whether the class will use a collection to generate incremented identifiers.
isIdGeneratorNone ( ) : boolean Checks whether the class uses no id generator.
isIdGeneratorUuid ( ) : boolean Checks whether the class will generate a uuid id.
isIdentifier ( $fieldName ) {@inheritDoc}
isInheritanceTypeCollectionPerClass ( ) : boolean Checks whether the mapped class uses the COLLECTION_PER_CLASS inheritance mapping strategy.
isInheritanceTypeNone ( ) : boolean
isInheritanceTypeSingleCollection ( ) : boolean Checks whether the mapped class uses the SINGLE_COLLECTION inheritance mapping strategy.
isInheritedField ( string $fieldName ) : boolean Checks whether a mapped field is inherited from an entity superclass.
isMappedToCollection ( ) : boolean Returns TRUE if this Document is mapped to a collection FALSE otherwise.
isNullable ( string $fieldName ) : boolean Check if the field is not null.
isSharded ( ) : boolean Checks whether this document has shard key or not.
isSingleValuedAssociation ( $fieldName ) {@inheritDoc}
isSingleValuedEmbed ( string $fieldName ) : boolean Checks whether the class has a mapped embedded document for the specified field and if yes, checks whether it is a single-valued association (to-one).
isSingleValuedReference ( string $fieldName ) : boolean Checks whether the class has a mapped association for the specified field and if yes, checks whether it is a single-valued association (to-one).
mapField ( array $mapping ) : array Map a field.
mapFile ( array $mapping ) Map a MongoGridFSFile.
mapManyEmbedded ( array $mapping ) Map a collection of embedded documents.
mapManyReference ( array $mapping ) Map a collection of document references.
mapOneEmbedded ( array $mapping ) Map a single embedded document.
mapOneReference ( array $mapping ) Map a single document reference.
registerAlsoLoadMethod ( string $method, array | string $fields ) Registers a method for loading document data before field hydration.
setAlsoLoadMethods ( array $methods ) Sets the AlsoLoad methods for documents of this class.
setChangeTrackingPolicy ( integer $policy ) Sets the change tracking policy used by this class.
setCollection ( array | string $name ) Sets the collection this Document is mapped to.
setCollectionCapped ( boolean $bool ) Set whether or not the documents collection is capped.
setCollectionMax ( integer $max ) Set the collection max.
setCollectionSize ( integer $size ) Set the collection size.
setCustomRepositoryClass ( string $repositoryClassName ) Registers a custom repository class for the document class.
setDatabase ( string $db ) Set the database this Document is mapped to.
setDefaultDiscriminatorValue ( string $defaultDiscriminatorValue ) Sets the default discriminator value to be used for this class Used for JOINED and SINGLE_TABLE inheritance mapping strategies if the document has no discriminator value
setDiscriminatorField ( string $discriminatorField ) Sets the discriminator field.
setDiscriminatorMap ( array $map ) Sets the discriminator values used by this class.
setDiscriminatorValue ( string $value ) Sets the discriminator value for this class.
setDistance ( string $distance ) Set the field name that stores the distance.
setFieldValue ( object $document, string $field, mixed $value ) Sets the specified field to the specified value on the given document.
setFile ( string $file ) Set the field name that stores the grid file.
setIdGenerator ( AbstractIdGenerator $generator ) Sets the ID generator used to generate IDs for instances of this class.
setIdGeneratorOptions ( array $generatorOptions ) Sets the Id generator options.
setIdGeneratorType ( string $generatorType ) Sets the type of Id generator to use for the mapped class.
setIdentifier ( string $identifier ) INTERNAL: Sets the mapped identifier field of this class.
setIdentifierValue ( object $document, mixed $id ) Sets the document identifier of a document.
setInheritanceType ( integer $type ) Sets the inheritance type used by the class and it's subclasses.
setLifecycleCallbacks ( array $callbacks ) Sets the lifecycle callbacks for documents of this class.
setLockField ( string $lockField ) Sets the name of the field that is to be used for storing whether a document is currently locked or not.
setLockMapping ( array &$mapping ) Sets the version field mapping used for versioning. Sets the default value to use depending on the column type.
setLockable ( boolean $bool ) Sets whether this class is to allow pessimistic locking.
setParentClasses ( array $classNames ) Sets the parent class names.
setRequireIndexes ( boolean $requireIndexes ) Set whether or not queries on this document should require indexes.
setShardKey ( array $keys, array $options = [] ) Set shard key for this Document.
setSlaveOkay ( boolean | null $slaveOkay ) Sets the slaveOkay option applied to collections for this class.
setSubclasses ( array $subclasses ) Sets the mapped subclasses of this class.
setVersionField ( string $versionField ) Sets the name of the field that is to be used for versioning if this class is versioned for optimistic locking.
setVersionMapping ( array &$mapping ) Sets the version field mapping used for versioning. Sets the default value to use depending on the column type.
setVersioned ( boolean $bool ) Sets whether this class is to be versioned for optimistic locking.
setWriteConcern ( string $writeConcern ) Sets the write concern used by this class.

비공개 메소드들

메소드 설명
applyStorageStrategy ( array &$mapping ) Validates the storage strategy of a mapping for consistency

메소드 상세

__construct() 공개 메소드

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

addIndex() 공개 메소드

Add a index for this Document.
public addIndex ( array $keys, array $options = [] )
$keys array Array of keys for the index.
$options array Array of options for the index.

addInheritedAssociationMapping() 공개 메소드

This is mainly used to add inherited association mappings to derived classes.
public addInheritedAssociationMapping ( array $mapping ) : void
$mapping array
리턴 void

addInheritedFieldMapping() 공개 메소드

This is mainly used to add inherited field mappings to derived classes.
public addInheritedFieldMapping ( array $fieldMapping )
$fieldMapping array

addLifecycleCallback() 공개 메소드

If the callback is already registered, this is a NOOP.
public addLifecycleCallback ( string $callback, string $event )
$callback string
$event string

getAssociationCollectionClass() 공개 메소드

Retrieve the collectionClass associated with an association
public getAssociationCollectionClass ( string $assocName )
$assocName string

getAssociationMappedByTargetField() 공개 메소드

{@inheritDoc}
public getAssociationMappedByTargetField ( $fieldName )

getAssociationNames() 공개 메소드

{@inheritDoc}
public getAssociationNames ( )

getAssociationTargetClass() 공개 메소드

{@inheritDoc}
public getAssociationTargetClass ( $assocName )

getCollection() 공개 메소드

Get the collection this Document is mapped to.
public getCollection ( ) : string
리턴 string $collection The collection name.

getCollectionCapped() 공개 메소드

Get whether or not the documents collection is capped.
public getCollectionCapped ( ) : boolean
리턴 boolean

getCollectionMax() 공개 메소드

Get the collection max.
public getCollectionMax ( ) : integer
리턴 integer

getCollectionSize() 공개 메소드

Get the collection size
public getCollectionSize ( ) : integer
리턴 integer

getDatabase() 공개 메소드

Returns the database this Document is mapped to.
public getDatabase ( ) : string
리턴 string $db The database name.

getDatabaseIdentifierValue() 공개 메소드

Casts the identifier to its database type.
public getDatabaseIdentifierValue ( mixed $id ) : mixed
$id mixed
리턴 mixed $id

getDistance() 공개 메소드

Returns the distance field name.
public getDistance ( ) : string
리턴 string $distance The distance field name.

getEmbeddedFieldsMappings() 공개 메소드

Gets mappings of fields holding embedded document(s).
public getEmbeddedFieldsMappings ( ) : array
리턴 array of field mappings

getFieldMapping() 공개 메소드

Gets the mapping of a field.
public getFieldMapping ( string $fieldName ) : array
$fieldName string The field name.
리턴 array The field mapping.

getFieldMappingByDbFieldName() 공개 메소드

E.g. it returns identifier's mapping when called with _id.
public getFieldMappingByDbFieldName ( string $dbFieldName ) : array
$dbFieldName string
리턴 array

getFieldNames() 공개 메소드

{@inheritDoc}
public getFieldNames ( )

getFieldValue() 공개 메소드

Gets the specified field's value off the given document.
public getFieldValue ( object $document, string $field ) : mixed
$document object
$field string
리턴 mixed

getFile() 공개 메소드

Returns the file field name.
public getFile ( ) : string
리턴 string $file The file field name.

getIdentifier() 공개 메소드

Since MongoDB only allows exactly one identifier field this will always return an array with only one value
public getIdentifier ( )

getIdentifierFieldNames() 공개 메소드

Since MongoDB only allows exactly one identifier field this will always return an array with only one value

getIdentifierObject() 공개 메소드

Get the document identifier object as a database type.
public getIdentifierObject ( object $document ) : MongoId
$document object
리턴 MongoId $id The MongoID object.

getIdentifierValue() 공개 메소드

Gets the document identifier as a PHP type.
public getIdentifierValue ( object $document ) : mixed
$document object
리턴 mixed $id

getIdentifierValues() 공개 메소드

Since MongoDB only allows exactly one identifier field this is a proxy to {@see \getIdentifierValue()} and returns an array with the identifier field as a key.
public getIdentifierValues ( $object )

getIndexes() 공개 메소드

Returns the array of indexes for this Document.
public getIndexes ( ) : array
리턴 array $indexes The array of indexes.

getLifecycleCallbacks() 공개 메소드

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

getName() 공개 메소드

{@inheritDoc}
public getName ( )

getNamespace() 공개 메소드

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

getPHPIdentifierValue() 공개 메소드

Casts the identifier to its portable PHP type.
public getPHPIdentifierValue ( mixed $id ) : mixed
$id mixed
리턴 mixed $id

getReflectionClass() 공개 메소드

{@inheritDoc}
public getReflectionClass ( )

getReflectionProperties() 공개 메소드

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

getReflectionProperty() 공개 메소드

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

getShardKey() 공개 메소드

public getShardKey ( ) : array
리턴 array

getTypeOfField() 공개 메소드

{@inheritDoc}
public getTypeOfField ( $fieldName )

getWriteConcern() 공개 메소드

public getWriteConcern ( ) : string
리턴 string

hasAssociation() 공개 메소드

Checks whether the class has a mapped association (embed or reference) with the given field name.
public hasAssociation ( $fieldName )

hasDiscriminator() 공개 메소드

Checks whether the document has a discriminator field and value configured.
public hasDiscriminator ( ) : boolean
리턴 boolean

hasEmbed() 공개 메소드

Checks whether the class has a mapped embed with the given field name.
public hasEmbed ( string $fieldName ) : boolean
$fieldName string
리턴 boolean

hasField() 공개 메소드

{@inheritDoc}
public hasField ( $fieldName )

hasIndexes() 공개 메소드

Checks whether this document has indexes or not.
public hasIndexes ( ) : boolean
리턴 boolean

hasLifecycleCallbacks() 공개 메소드

Checks whether the class has callbacks registered for a lifecycle event.
public hasLifecycleCallbacks ( string $event ) : boolean
$event string Lifecycle event
리턴 boolean

hasReference() 공개 메소드

Checks whether the class has a mapped association with the given field name.
public hasReference ( string $fieldName ) : boolean
$fieldName string
리턴 boolean

hasWriteConcern() 공개 메소드

Whether there is a write concern configured for this class.
public hasWriteConcern ( ) : boolean
리턴 boolean

invokeLifecycleCallbacks() 공개 메소드

Dispatches the lifecycle event of the given document by invoking all registered callbacks.
public invokeLifecycleCallbacks ( string $event, object $document, array $arguments = null )
$event string Lifecycle event
$document object Document on which the event occurred
$arguments array Arguments to pass to all callbacks

isAssociationInverseSide() 공개 메소드

{@inheritDoc}
public isAssociationInverseSide ( $fieldName )

isChangeTrackingDeferredExplicit() 공개 메소드

Whether the change tracking policy of this class is "deferred explicit".

isChangeTrackingDeferredImplicit() 공개 메소드

Whether the change tracking policy of this class is "deferred implicit".

isChangeTrackingNotify() 공개 메소드

Whether the change tracking policy of this class is "notify".
public isChangeTrackingNotify ( ) : boolean
리턴 boolean

isCollectionValuedAssociation() 공개 메소드

Checks whether the class has a mapped reference or embed for the specified field and is a collection valued association.
public isCollectionValuedAssociation ( $fieldName )

isCollectionValuedEmbed() 공개 메소드

Checks whether the class has a mapped embedded document for the specified field and if yes, checks whether it is a collection-valued association (to-many).
public isCollectionValuedEmbed ( string $fieldName ) : boolean
$fieldName string
리턴 boolean TRUE if the association exists and is collection-valued, FALSE otherwise.

isCollectionValuedReference() 공개 메소드

Checks whether the class has a mapped association for the specified field and if yes, checks whether it is a collection-valued association (to-many).
public isCollectionValuedReference ( string $fieldName ) : boolean
$fieldName string
리턴 boolean TRUE if the association exists and is collection-valued, FALSE otherwise.

isFile() 공개 메소드

Returns TRUE if this Document is a file to be stored on the MongoGridFS FALSE otherwise.
public isFile ( ) : boolean
리턴 boolean

isIdGeneratorAuto() 공개 메소드

Checks whether the class will generate a new \MongoId instance for us.
public isIdGeneratorAuto ( ) : boolean
리턴 boolean TRUE if the class uses the AUTO generator, FALSE otherwise.

isIdGeneratorIncrement() 공개 메소드

Checks whether the class will use a collection to generate incremented identifiers.
public isIdGeneratorIncrement ( ) : boolean
리턴 boolean TRUE if the class uses the INCREMENT generator, FALSE otherwise.

isIdGeneratorNone() 공개 메소드

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

isIdGeneratorUuid() 공개 메소드

Checks whether the class will generate a uuid id.
public isIdGeneratorUuid ( ) : boolean
리턴 boolean TRUE if the class uses the UUID generator, FALSE otherwise.

isIdentifier() 공개 메소드

{@inheritDoc}
public isIdentifier ( $fieldName )

isInheritanceTypeCollectionPerClass() 공개 메소드

Checks whether the mapped class uses the COLLECTION_PER_CLASS inheritance mapping strategy.

isInheritanceTypeNone() 공개 메소드

public isInheritanceTypeNone ( ) : boolean
리턴 boolean

isInheritanceTypeSingleCollection() 공개 메소드

Checks whether the mapped class uses the SINGLE_COLLECTION inheritance mapping strategy.

isInheritedField() 공개 메소드

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

isMappedToCollection() 공개 메소드

Returns TRUE if this Document is mapped to a collection FALSE otherwise.
public isMappedToCollection ( ) : boolean
리턴 boolean

isNullable() 공개 메소드

Check if the field is not null.
public isNullable ( string $fieldName ) : boolean
$fieldName string The field name
리턴 boolean TRUE if the field is not null, FALSE otherwise.

isSharded() 공개 메소드

Checks whether this document has shard key or not.
public isSharded ( ) : boolean
리턴 boolean

isSingleValuedAssociation() 공개 메소드

Checks whether the class has a mapped reference or embed for the specified field and is a single valued association.
public isSingleValuedAssociation ( $fieldName )

isSingleValuedEmbed() 공개 메소드

Checks whether the class has a mapped embedded document for the specified field and if yes, checks whether it is a single-valued association (to-one).
public isSingleValuedEmbed ( string $fieldName ) : boolean
$fieldName string
리턴 boolean TRUE if the association exists and is single-valued, FALSE otherwise.

isSingleValuedReference() 공개 메소드

Checks whether the class has a mapped association for the specified field and if yes, checks whether it is a single-valued association (to-one).
public isSingleValuedReference ( string $fieldName ) : boolean
$fieldName string
리턴 boolean TRUE if the association exists and is single-valued, FALSE otherwise.

mapField() 공개 메소드

Map a field.
public mapField ( array $mapping ) : array
$mapping array The mapping information.
리턴 array

mapFile() 공개 메소드

Map a MongoGridFSFile.
public mapFile ( array $mapping )
$mapping array The mapping information.

mapManyEmbedded() 공개 메소드

Map a collection of embedded documents.
public mapManyEmbedded ( array $mapping )
$mapping array The mapping information.

mapManyReference() 공개 메소드

Map a collection of document references.
public mapManyReference ( array $mapping )
$mapping array The mapping information.

mapOneEmbedded() 공개 메소드

Map a single embedded document.
public mapOneEmbedded ( array $mapping )
$mapping array The mapping information.

mapOneReference() 공개 메소드

Map a single document reference.
public mapOneReference ( array $mapping )
$mapping array The mapping information.

registerAlsoLoadMethod() 공개 메소드

Note: A method may be registered multiple times for different fields. it will be invoked only once for the first field found.
public registerAlsoLoadMethod ( string $method, array | string $fields )
$method string Method name
$fields array | string Database field name(s)

setAlsoLoadMethods() 공개 메소드

Any previously registered methods are overwritten.
public setAlsoLoadMethods ( array $methods )
$methods array

setChangeTrackingPolicy() 공개 메소드

Sets the change tracking policy used by this class.
public setChangeTrackingPolicy ( integer $policy )
$policy integer

setCollection() 공개 메소드

Sets the collection this Document is mapped to.
public setCollection ( array | string $name )
$name array | string

setCollectionCapped() 공개 메소드

Set whether or not the documents collection is capped.
public setCollectionCapped ( boolean $bool )
$bool boolean

setCollectionMax() 공개 메소드

Set the collection max.
public setCollectionMax ( integer $max )
$max integer

setCollectionSize() 공개 메소드

Set the collection size.
public setCollectionSize ( integer $size )
$size integer

setCustomRepositoryClass() 공개 메소드

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

setDatabase() 공개 메소드

Set the database this Document is mapped to.
public setDatabase ( string $db )
$db string The database name

setDefaultDiscriminatorValue() 공개 메소드

Sets the default discriminator value to be used for this class Used for JOINED and SINGLE_TABLE inheritance mapping strategies if the document has no discriminator value
public setDefaultDiscriminatorValue ( string $defaultDiscriminatorValue )
$defaultDiscriminatorValue string

setDiscriminatorField() 공개 메소드

The field name is the the unmapped database field. Discriminator values are only used to discern the hydration class and are not mapped to class properties.
public setDiscriminatorField ( string $discriminatorField )
$discriminatorField string

setDiscriminatorMap() 공개 메소드

Used for JOINED and SINGLE_TABLE inheritance mapping strategies.
public setDiscriminatorMap ( array $map )
$map array

setDiscriminatorValue() 공개 메소드

Used for JOINED/SINGLE_TABLE inheritance and multiple document types in a single collection.
public setDiscriminatorValue ( string $value )
$value string

setDistance() 공개 메소드

Set the field name that stores the distance.
public setDistance ( string $distance )
$distance string

setFieldValue() 공개 메소드

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

setFile() 공개 메소드

Set the field name that stores the grid file.
public setFile ( string $file )
$file string

setIdGenerator() 공개 메소드

Sets the ID generator used to generate IDs for instances of this class.
public setIdGenerator ( AbstractIdGenerator $generator )
$generator Doctrine\ODM\MongoDB\Id\AbstractIdGenerator

setIdGeneratorOptions() 공개 메소드

Sets the Id generator options.
public setIdGeneratorOptions ( array $generatorOptions )
$generatorOptions array Generator options.

setIdGeneratorType() 공개 메소드

Sets the type of Id generator to use for the mapped class.
public setIdGeneratorType ( string $generatorType )
$generatorType string Generator type.

setIdentifier() 공개 메소드

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

setIdentifierValue() 공개 메소드

The value will be converted to a PHP type before being set.
public setIdentifierValue ( object $document, mixed $id )
$document object
$id mixed

setInheritanceType() 공개 메소드

Sets the inheritance type used by the class and it's subclasses.
public setInheritanceType ( integer $type )
$type integer

setLifecycleCallbacks() 공개 메소드

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

setLockField() 공개 메소드

Sets the name of the field that is to be used for storing whether a document is currently locked or not.
public setLockField ( string $lockField )
$lockField string

setLockMapping() 공개 메소드

Sets the version field mapping used for versioning. Sets the default value to use depending on the column type.
public setLockMapping ( array &$mapping )
$mapping array The version field mapping array

setLockable() 공개 메소드

Sets whether this class is to allow pessimistic locking.
public setLockable ( boolean $bool )
$bool boolean

setParentClasses() 공개 메소드

Assumes that the class names in the passed array are in the order: directParent -> directParentParent -> directParentParentParent ... -> root.
public setParentClasses ( array $classNames )
$classNames array

setRequireIndexes() 공개 메소드

Set whether or not queries on this document should require indexes.
사용 중단: method was deprecated in 1.2 and will be removed in 2.0
public setRequireIndexes ( boolean $requireIndexes )
$requireIndexes boolean

setShardKey() 공개 메소드

Set shard key for this Document.
public setShardKey ( array $keys, array $options = [] )
$keys array Array of document keys.
$options array Array of sharding options.

setSlaveOkay() 공개 메소드

Sets the slaveOkay option applied to collections for this class.
public setSlaveOkay ( boolean | null $slaveOkay )
$slaveOkay boolean | null

setSubclasses() 공개 메소드

Sets the mapped subclasses of this class.
public setSubclasses ( array $subclasses )
$subclasses array The names of all mapped subclasses.

setVersionField() 공개 메소드

Sets the name of the field that is to be used for versioning if this class is versioned for optimistic locking.
public setVersionField ( string $versionField )
$versionField string

setVersionMapping() 공개 메소드

Sets the version field mapping used for versioning. Sets the default value to use depending on the column type.
public setVersionMapping ( array &$mapping )
$mapping array The version field mapping array

setVersioned() 공개 메소드

Sets whether this class is to be versioned for optimistic locking.
public setVersioned ( boolean $bool )
$bool boolean

setWriteConcern() 공개 메소드

Sets the write concern used by this class.
public setWriteConcern ( string $writeConcern )
$writeConcern string

프로퍼티 상세

$alsoLoadMethods 공개적으로 프로퍼티

READ-ONLY: Array of fields to also load with a given method.
public array $alsoLoadMethods
리턴 array

$associationMappings 공개적으로 프로퍼티

Keys are field names and values are mapping definitions.
public array $associationMappings
리턴 array

$changeTrackingPolicy 공개적으로 프로퍼티

READ-ONLY: The policy used for change-tracking on entities of this class.
public int $changeTrackingPolicy
리턴 integer

$collection 공개적으로 프로퍼티

READ-ONLY: The name of the mongo collection the document is mapped to.
public $collection

$collectionCapped 공개적으로 프로퍼티

READ-ONLY: If the collection should be a fixed size.
public $collectionCapped

$collectionMax 공개적으로 프로퍼티

READ-ONLY: If the collection is fixed size, the maximum number of elements to store in the collection.
public $collectionMax

$collectionSize 공개적으로 프로퍼티

READ-ONLY: If the collection is fixed size, its size in bytes.
public $collectionSize

$customRepositoryClassName 공개적으로 프로퍼티

(Optional).
public string $customRepositoryClassName
리턴 string

$db 공개적으로 프로퍼티

READ-ONLY: The name of the mongo database the document is mapped to.
public $db

$defaultDiscriminatorValue 공개적으로 프로퍼티

READ-ONLY: The default value for discriminatorField in case it's not set in the document
또한 보기: discriminatorField
public string $defaultDiscriminatorValue
리턴 string

$discriminatorField 공개적으로 프로퍼티

READ-ONLY: The definition of the discriminator field used in SINGLE_COLLECTION inheritance mapping.
public string $discriminatorField
리턴 string

$discriminatorMap 공개적으로 프로퍼티

This does only apply to the SINGLE_COLLECTION inheritance mapping strategy where a discriminator field is used.
또한 보기: discriminatorField
public mixed $discriminatorMap
리턴 mixed

$discriminatorValue 공개적으로 프로퍼티

This does only apply to the JOINED and SINGLE_COLLECTION inheritance mapping strategies where a discriminator field is used.
또한 보기: discriminatorField
public mixed $discriminatorValue
리턴 mixed

$distance 공개적으로 프로퍼티

READ-ONLY: The field that stores the calculated distance when performing geo spatial queries.
public $distance

$fieldMappings 공개적으로 프로퍼티

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. Multiple fields of an document can have the id attribute, forming a composite key.
public array $fieldMappings
리턴 array

$file 공개적으로 프로퍼티

READ-ONLY: The field that stores a file reference and indicates the document is a file and should be stored on the MongoGridFS.
public $file

$generatorOptions 공개적으로 프로퍼티

READ-ONLY: The Id generator options.
public array $generatorOptions
리턴 array

$generatorType 공개적으로 프로퍼티

READ-ONLY: The Id generator type used by the class.
public string $generatorType
리턴 string

$idGenerator 공개적으로 프로퍼티

READ-ONLY: The ID generator used for generating IDs for this class.
public AbstractIdGenerator,Doctrine\ODM\MongoDB\Id $idGenerator
리턴 Doctrine\ODM\MongoDB\Id\AbstractIdGenerator

$identifier 공개적으로 프로퍼티

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

$indexes 공개적으로 프로퍼티

READ-ONLY: The array of indexes for the document collection.
public $indexes

$inheritanceType 공개적으로 프로퍼티

READ-ONLY: The inheritance mapping type used by the class.
public int $inheritanceType
리턴 integer

$isEmbeddedDocument 공개적으로 프로퍼티

READ-ONLY: Whether this class describes the mapping of a embedded document.
public bool $isEmbeddedDocument
리턴 boolean

$isLockable 공개적으로 프로퍼티

READ-ONLY: A flag for whether or not instances of this class are to allow pessimistic locking.
public bool $isLockable
리턴 boolean

$isMappedSuperclass 공개적으로 프로퍼티

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

$isQueryResultDocument 공개적으로 프로퍼티

READ-ONLY: Whether this class describes the mapping of an aggregation result document.
public bool $isQueryResultDocument
리턴 boolean

$isVersioned 공개적으로 프로퍼티

READ-ONLY: A flag for whether or not instances of this class are to be versioned with optimistic locking.
public bool $isVersioned
리턴 boolean

$lifecycleCallbacks 공개적으로 프로퍼티

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

$lockField 공개적으로 프로퍼티

READ-ONLY: The name of the field which is used for locking a document.
public mixed $lockField
리턴 mixed

$name 공개적으로 프로퍼티

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

$namespace 공개적으로 프로퍼티

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

$parentClasses 공개적으로 프로퍼티

READ-ONLY: The names of the parent classes (ancestors).
public array $parentClasses
리턴 array

$reflClass 공개적으로 프로퍼티

The ReflectionClass instance of the mapped class.
public ReflectionClass $reflClass
리턴 ReflectionClass

$reflFields 공개적으로 프로퍼티

The ReflectionProperty instances of the mapped class.
public ReflectionProperty[] $reflFields
리턴 ReflectionProperty[]

$requireIndexes 공개적으로 프로퍼티

READ-ONLY: Whether or not queries on this document should require indexes.
사용 중단: property was deprecated in 1.2 and will be removed in 2.0
public $requireIndexes

$rootDocumentName 공개적으로 프로퍼티

READ-ONLY: The name of the document class that is at the root of the mapped document inheritance hierarchy. If the document is not part of a mapped inheritance hierarchy this is the same as {@link $documentName}.
public string $rootDocumentName
리턴 string

$shardKey 공개적으로 프로퍼티

READ-ONLY: Keys and options describing shard key. Only for sharded collections.
public $shardKey

$slaveOkay 공개적으로 프로퍼티

READ-ONLY: Whether or not reads for this class are okay to read from a slave.
public $slaveOkay

$subClasses 공개적으로 프로퍼티

READ-ONLY: The names of all subclasses (descendants).
public array $subClasses
리턴 array

$versionField 공개적으로 프로퍼티

READ-ONLY: The name of the field which is used for versioning in optimistic locking (if any).
public mixed $versionField
리턴 mixed

$writeConcern 공개적으로 프로퍼티

READ-ONLY: Describes the level of acknowledgement requested from MongoDB for write operations.
public $writeConcern