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
Afficher le fichier Open project: doctrine/couchdb-odm Class Usage Examples

Protected Properties

Свойство Type Description
$class Doctrine\ODM\CouchDB\Mapping\ClassMetadata
$dm DocumentManager
$documentName string
$documentType string

Méthodes publiques

Méthode 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 méthode

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 méthode

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

findAll() public méthode

public findAll ( )

findBy() public méthode

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

findMany() public méthode

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
Résultat array

findOneBy() public méthode

public findOneBy ( array $criteria )
$criteria array

getClassMetadata() public méthode

public getClassMetadata ( ) : ClassMetadata
Résultat Doctrine\ODM\CouchDB\Mapping\ClassMetadata

getClassName() public méthode

public getClassName ( )

getDocumentManager() public méthode

public getDocumentManager ( ) : DocumentManager
Résultat DocumentManager

getDocumentName() public méthode

public getDocumentName ( ) : string
Résultat string

refresh() final public méthode

final public refresh ( object $document ) : void
$document object
Résultat void

Property Details

$class protected_oe property

protected ClassMetadata,Doctrine\ODM\CouchDB\Mapping $class
Résultat Doctrine\ODM\CouchDB\Mapping\ClassMetadata

$dm protected_oe property

protected DocumentManager,Doctrine\ODM\CouchDB $dm
Résultat DocumentManager

$documentName protected_oe property

protected string $documentName
Résultat string

$documentType protected_oe property

protected string $documentType
Résultat string