메소드 |
설명 |
|
clear ( string | null $documentName = null ) |
Clears the DocumentManager. |
|
close ( ) |
Closes the DocumentManager. All documents that are currently managed
by this DocumentManager become detached. The DocumentManager may no longer
be used after it is closed. |
|
contains ( object $document ) : boolean |
Determines whether a document instance is managed in this DocumentManager. |
|
create ( Connection $conn = null, Configuration $config = null, Doctrine\Common\EventManager $eventManager = null ) : DocumentManager |
Creates a new Document that operates on the given Mongo connection
and uses the given Configuration. |
|
createAggregationBuilder ( string $documentName ) : Builder |
Creates a new aggregation builder instance for a class. |
|
createDBRef ( mixed $document, array $referenceMapping = null ) : array |
Returns a DBRef array for the supplied document. |
|
createQueryBuilder ( string $documentName = null ) : Query\Builder |
Create a new Query instance for a class. |
|
detach ( object $document ) |
Detaches a document from the DocumentManager, causing a managed document to
become detached. Unflushed changes made to the document if any
(including removal of the document), will not be synchronized to the database. |
|
find ( string $documentName, mixed $identifier, integer $lockMode = LockMode::NONE, integer $lockVersion = null ) : object |
Finds a Document by its identifier. |
|
flush ( object $document = null, array $options = [] ) |
Flushes all changes to objects that have been queued up to now to the database. |
|
getClassMetadata ( string $className ) : ClassMetadata |
Returns the metadata for a class. |
|
getConfiguration ( ) : Configuration |
Gets the Configuration used by the DocumentManager. |
|
getConnection ( ) : Connection |
Gets the PHP Mongo instance that this DocumentManager wraps. |
|
getDocumentCollection ( string $className ) : Doctrine\MongoDB\Collection |
Returns the MongoCollection instance for a class. |
|
getDocumentCollections ( ) : array |
Gets the array of instantiated document collection instances. |
|
getDocumentDatabase ( string $className ) : Doctrine\MongoDB\Database |
Returns the MongoDB instance for a class. |
|
getDocumentDatabases ( ) : array |
Gets the array of instantiated document database instances. |
|
getEventManager ( ) : Doctrine\Common\EventManager |
Gets the EventManager used by the DocumentManager. |
|
getFilterCollection ( ) : Doctrine\ODM\MongoDB\Query\FilterCollection |
Gets the filter collection. |
|
getHydratorFactory ( ) : Doctrine\ODM\MongoDB\Hydrator\HydratorInterface |
Gets the Hydrator factory used by the DocumentManager to generate and get hydrators
for each type of document. |
|
getMetadataFactory ( ) : ClassMetadataFactory |
Gets the metadata factory used to gather the metadata of classes. |
|
getPartialReference ( string $documentName, mixed $identifier ) : object |
Gets a partial reference to the document identified by the given type and identifier
without actually loading it, if the document is not yet loaded. |
|
getProxyFactory ( ) : ProxyFactory |
Gets the proxy factory used by the DocumentManager to create document proxies. |
|
getReference ( string $documentName, string | object $identifier ) : mixed | object |
Gets a reference to the document identified by the given type and identifier
without actually loading it. |
|
getRepository ( string $documentName ) : DocumentRepository |
Gets the repository for a document class. |
|
getSchemaManager ( ) : SchemaManager |
Returns SchemaManager, used to create/drop indexes/collections/databases. |
|
getUnitOfWork ( ) : UnitOfWork |
Gets the UnitOfWork used by the DocumentManager to coordinate operations. |
|
initializeObject ( object $obj ) |
Helper method to initialize a lazy loading proxy or persistent collection. |
|
isOpen ( ) : boolean |
Check if the Document manager is open or closed. |
|
lock ( object $document, integer $lockMode, integer $lockVersion = null ) |
Acquire a lock on the given document. |
|
merge ( object $document ) : object |
Merges the state of a detached document into the persistence context
of this DocumentManager and returns the managed copy of the document. |
|
persist ( object $document ) |
Tells the DocumentManager to make an instance managed and persistent. |
|
refresh ( object $document ) |
Refreshes the persistent state of a document from the database,
overriding any local changes that have not yet been persisted. |
|
remove ( object $document ) |
Removes a document instance. |
|
unlock ( object $document ) |
Releases a lock on the given document. |
|