PHP 클래스 Doctrine\ODM\MongoDB\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.
부터: 1.0
저자: Jonathan H. Wage ([email protected])
저자: Roman Borschel ([email protected])
상속: implements Doctrine\Common\Persistence\ObjectRepository, implements Doctrine\Common\Collections\Selectable
파일 보기 프로젝트 열기: doctrine/mongodb-odm 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$class Doctrine\ODM\MongoDB\Mapping\ClassMetadata
$dm DocumentManager
$documentName string
$uow UnitOfWork

공개 메소드들

메소드 설명
__call ( string $method, array $arguments ) : array | object Adds support for magic finders.
__construct ( DocumentManager $dm, UnitOfWork $uow, ClassMetadata $classMetadata ) Initializes this instance with the specified document manager, unit of work and class metadata.
clear ( ) Clears the repository, causing all managed documents to become detached.
createAggregationBuilder ( ) : Builder Creates a new Aggregation\Builder instance that is prepopulated for this document name.
createQueryBuilder ( ) : Builder Creates a new Query\Builder instance that is preconfigured for this document name.
find ( mixed $id, integer $lockMode = LockMode::NONE, integer $lockVersion = null ) : object | null Finds a document matching the specified identifier. Optionally a lock mode and expected version may be specified.
findAll ( ) : array Finds all documents in the repository.
findBy ( array $criteria, array $sort = null, integer | null $limit = null, integer | null $skip = null ) : array Finds documents by a set of criteria.
findOneBy ( array $criteria ) : object Finds a single document by a set of criteria.
getClassMetadata ( ) : ClassMetadata
getClassName ( ) : string
getDocumentManager ( ) : DocumentManager
getDocumentName ( ) : string
matching ( Doctrine\Common\Collections\Criteria $criteria ) : Doctrine\Common\Collections\Collection Selects all elements from a selectable that match the expression and returns a new collection containing these elements.

보호된 메소드들

메소드 설명
getDocumentPersister ( )

메소드 상세

__call() 공개 메소드

Adds support for magic finders.
public __call ( string $method, array $arguments ) : array | object
$method string
$arguments array
리턴 array | object The found document/documents.

__construct() 공개 메소드

Initializes this instance with the specified document manager, unit of work and class metadata.
public __construct ( DocumentManager $dm, UnitOfWork $uow, ClassMetadata $classMetadata )
$dm DocumentManager The DocumentManager to use.
$uow UnitOfWork The UnitOfWork to use.
$classMetadata Doctrine\ODM\MongoDB\Mapping\ClassMetadata The class metadata.

clear() 공개 메소드

Clears the repository, causing all managed documents to become detached.
public clear ( )

createAggregationBuilder() 공개 메소드

Creates a new Aggregation\Builder instance that is prepopulated for this document name.
public createAggregationBuilder ( ) : Builder
리턴 Doctrine\ODM\MongoDB\Aggregation\Builder

createQueryBuilder() 공개 메소드

Creates a new Query\Builder instance that is preconfigured for this document name.
public createQueryBuilder ( ) : Builder
리턴 Doctrine\ODM\MongoDB\Query\Builder $qb

find() 공개 메소드

Finds a document matching the specified identifier. Optionally a lock mode and expected version may be specified.
public find ( mixed $id, integer $lockMode = LockMode::NONE, integer $lockVersion = null ) : object | null
$id mixed Identifier.
$lockMode integer Optional. Lock mode; one of the LockMode constants.
$lockVersion integer Optional. Expected version.
리턴 object | null The document, if found, otherwise null.

findAll() 공개 메소드

Finds all documents in the repository.
public findAll ( ) : array
리턴 array

findBy() 공개 메소드

Finds documents by a set of criteria.
public findBy ( array $criteria, array $sort = null, integer | null $limit = null, integer | null $skip = null ) : array
$criteria array Query criteria
$sort array Sort array for Cursor::sort()
$limit integer | null Limit for Cursor::limit()
$skip integer | null Skip for Cursor::skip()
리턴 array

findOneBy() 공개 메소드

Finds a single document by a set of criteria.
public findOneBy ( array $criteria ) : object
$criteria array
리턴 object

getClassMetadata() 공개 메소드

public getClassMetadata ( ) : ClassMetadata
리턴 Doctrine\ODM\MongoDB\Mapping\ClassMetadata

getClassName() 공개 메소드

public getClassName ( ) : string
리턴 string

getDocumentManager() 공개 메소드

public getDocumentManager ( ) : DocumentManager
리턴 DocumentManager

getDocumentName() 공개 메소드

public getDocumentName ( ) : string
리턴 string

getDocumentPersister() 보호된 메소드

protected getDocumentPersister ( )

matching() 공개 메소드

Selects all elements from a selectable that match the expression and returns a new collection containing these elements.
또한 보기: Selectable::matching()
public matching ( Doctrine\Common\Collections\Criteria $criteria ) : Doctrine\Common\Collections\Collection
$criteria Doctrine\Common\Collections\Criteria
리턴 Doctrine\Common\Collections\Collection

프로퍼티 상세

$class 보호되어 있는 프로퍼티

protected ClassMetadata,Doctrine\ODM\MongoDB\Mapping $class
리턴 Doctrine\ODM\MongoDB\Mapping\ClassMetadata

$dm 보호되어 있는 프로퍼티

protected DocumentManager,Doctrine\ODM\MongoDB $dm
리턴 DocumentManager

$documentName 보호되어 있는 프로퍼티

protected string $documentName
리턴 string

$uow 보호되어 있는 프로퍼티

protected UnitOfWork,Doctrine\ODM\MongoDB $uow
리턴 UnitOfWork