PHP Class Doctrine\ODM\CouchDB\DocumentManager

Inheritance: implements Doctrine\Common\Persistence\ObjectManager
Mostra file Open project: doctrine/couchdb-odm Class Usage Examples

Public Methods

Method Description
__construct ( Doctrine\CouchDB\CouchDBClient $couchClient, Configuration $config = null, Doctrine\Common\EventManager $evm = null )
clear ( string $objectName = null ) Clears the ObjectManager. All objects that are currently managed by this ObjectManager become detached.
contains ( object $document ) : boolean
create ( array | Doctrine\CouchDB\CouchDBClient $couchParams, Configuration $config = null, Doctrine\Common\EventManager $evm = null ) : DocumentManager Factory method for a Document Manager.
createLuceneQuery ( string $designDocName, string $viewName ) : ODMLuceneQuery Create a CouchDB-Lucene Query.
createNativeQuery ( string $designDocName, string $viewName ) : Doctrine\CouchDB\View\Query Create a Native query for the view of the specified design document.
createQuery ( string $designDocName, string $viewName ) : ODMQuery Create a Query for the view in the specified design document.
detach ( $document )
find ( string $documentName, string $id ) : object Find the Document with the given id.
flush ( )
getClassMetadata ( string $class ) : ClassMetadata
getClassMetadataFactory ( ) : ClassMetadataFactory
getConfiguration ( ) : Configuration
getCouchDBClient ( ) : Doctrine\CouchDB\CouchDBClient
getDatabase ( )
getEventManager ( ) : Doctrine\Common\EventManager
getHttpClient ( )
getMetadataFactory ( ) : ClassMetadataFactory
getProxyFactory ( ) : ProxyFactory
getReference ( string $documentName, mixed $identifier ) : object Gets a reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded.
getRepository ( string $documentName ) : DocumentRepository
getUnitOfWork ( ) : UnitOfWork
initializeObject ( object $obj ) Initialize an object that is a lazy load proxy, or do nothing.
merge ( $document )
persist ( $object )
refresh ( object $document ) Refresh the given document by querying the CouchDB to get the current state.
remove ( $object )

Method Details

__construct() public method

public __construct ( Doctrine\CouchDB\CouchDBClient $couchClient, Configuration $config = null, Doctrine\Common\EventManager $evm = null )
$couchClient Doctrine\CouchDB\CouchDBClient
$config Configuration
$evm Doctrine\Common\EventManager

clear() public method

Clears the ObjectManager. All objects that are currently managed by this ObjectManager become detached.
public clear ( string $objectName = null )
$objectName string if given, only objects of this type will get detached

contains() public method

public contains ( object $document ) : boolean
$document object
return boolean

create() public static method

Factory method for a Document Manager.
public static create ( array | Doctrine\CouchDB\CouchDBClient $couchParams, Configuration $config = null, Doctrine\Common\EventManager $evm = null ) : DocumentManager
$couchParams array | Doctrine\CouchDB\CouchDBClient
$config Configuration
$evm Doctrine\Common\EventManager
return DocumentManager

createLuceneQuery() public method

Create a CouchDB-Lucene Query.
public createLuceneQuery ( string $designDocName, string $viewName ) : ODMLuceneQuery
$designDocName string
$viewName string
return Doctrine\ODM\CouchDB\View\ODMLuceneQuery

createNativeQuery() public method

A native query will return an array of data from the &include_docs=true parameter.
public createNativeQuery ( string $designDocName, string $viewName ) : Doctrine\CouchDB\View\Query
$designDocName string
$viewName string
return Doctrine\CouchDB\View\Query

createQuery() public method

Create a Query for the view in the specified design document.
public createQuery ( string $designDocName, string $viewName ) : ODMQuery
$designDocName string
$viewName string
return Doctrine\ODM\CouchDB\View\ODMQuery

detach() public method

public detach ( $document )

find() public method

Will return null if the document wasn't found.
public find ( string $documentName, string $id ) : object
$documentName string
$id string
return object

flush() public method

public flush ( )

getClassMetadata() public method

public getClassMetadata ( string $class ) : ClassMetadata
$class string
return Doctrine\ODM\CouchDB\Mapping\ClassMetadata

getClassMetadataFactory() public method

public getClassMetadataFactory ( ) : ClassMetadataFactory
return Doctrine\ODM\CouchDB\Mapping\ClassMetadataFactory

getConfiguration() public method

public getConfiguration ( ) : Configuration
return Configuration

getCouchDBClient() public method

public getCouchDBClient ( ) : Doctrine\CouchDB\CouchDBClient
return Doctrine\CouchDB\CouchDBClient

getDatabase() public method

public getDatabase ( )

getEventManager() public method

public getEventManager ( ) : Doctrine\Common\EventManager
return Doctrine\Common\EventManager

getHttpClient() public method

public getHttpClient ( )

getMetadataFactory() public method

public getMetadataFactory ( ) : ClassMetadataFactory
return Doctrine\ODM\CouchDB\Mapping\ClassMetadataFactory

getProxyFactory() public method

public getProxyFactory ( ) : ProxyFactory
return Doctrine\ODM\CouchDB\Proxy\ProxyFactory

getReference() public method

Gets a reference to the entity identified by the given type and identifier without actually loading it, if the entity is not yet loaded.
public getReference ( string $documentName, mixed $identifier ) : object
$documentName string The name of the entity type.
$identifier mixed The entity identifier.
return object The entity reference.

getRepository() public method

public getRepository ( string $documentName ) : DocumentRepository
$documentName string
return DocumentRepository

getUnitOfWork() public method

public getUnitOfWork ( ) : UnitOfWork
return UnitOfWork

initializeObject() public method

Initialize an object that is a lazy load proxy, or do nothing.
public initializeObject ( object $obj )
$obj object

merge() public method

public merge ( $document )

persist() public method

public persist ( $object )

refresh() public method

Refresh the given document by querying the CouchDB to get the current state.
public refresh ( object $document )
$document object

remove() public method

public remove ( $object )