PHP Class Doctrine\ODM\CouchDB\DocumentRepository

This class is designed for inheritance and users can subclass this class to write their own repositories with business-specific methods to locate documents.
Since: 1.0
Author: Jonathan H. Wage ([email protected])
Author: Roman Borschel ([email protected])
Inheritance: implements Doctrine\Common\Persistence\ObjectRepository
Datei anzeigen Open project: doctrine/couchdb-odm Class Usage Examples

Protected Properties

Property Type Description
$class Doctrine\ODM\CouchDB\Mapping\ClassMetadata
$dm DocumentManager
$documentName string
$documentType string

Public Methods

Method Description
__construct ( DocumentManager $dm, ClassMetadata $class ) Initializes a new DocumentRepository.
find ( mixed $id ) : object | null Find a single document by its identifier
findAll ( )
findBy ( array $criteria, array $orderBy = null, $limit = null, $offset = null )
findMany ( array $ids, null | integer $limit = null, null | integer $offset = null ) : array Find Many documents of the given repositories type by id.
findOneBy ( array $criteria )
getClassMetadata ( ) : ClassMetadata
getClassName ( )
getDocumentManager ( ) : DocumentManager
getDocumentName ( ) : string
refresh ( object $document ) : void

Method Details

__construct() public method

Initializes a new DocumentRepository.
public __construct ( DocumentManager $dm, ClassMetadata $class )
$dm DocumentManager The DocumentManager to use.
$class Doctrine\ODM\CouchDB\Mapping\ClassMetadata The class descriptor.

find() public method

Find a single document by its identifier
public find ( mixed $id ) : object | null
$id mixed A single identifier or an array of criteria.
return object | null $document

findAll() public method

public findAll ( )

findBy() public method

public findBy ( array $criteria, array $orderBy = null, $limit = null, $offset = null )
$criteria array
$orderBy array

findMany() public method

Find Many documents of the given repositories type by id.
public findMany ( array $ids, null | integer $limit = null, null | integer $offset = null ) : array
$ids array
$limit null | integer
$offset null | integer
return array

findOneBy() public method

public findOneBy ( array $criteria )
$criteria array

getClassMetadata() public method

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

getClassName() public method

public getClassName ( )

getDocumentManager() public method

public getDocumentManager ( ) : DocumentManager
return DocumentManager

getDocumentName() public method

public getDocumentName ( ) : string
return string

refresh() final public method

final public refresh ( object $document ) : void
$document object
return void

Property Details

$class protected_oe property

protected ClassMetadata,Doctrine\ODM\CouchDB\Mapping $class
return Doctrine\ODM\CouchDB\Mapping\ClassMetadata

$dm protected_oe property

protected DocumentManager,Doctrine\ODM\CouchDB $dm
return DocumentManager

$documentName protected_oe property

protected string $documentName
return string

$documentType protected_oe property

protected string $documentType
return string