abstract class AbstractRepositoryFactory implements RepositoryFactory (View source)

Abstract factory for creating document repositories.

Methods

ObjectRepository
getRepository(DocumentManager $documentManager, string $documentName)

Gets the repository for a document class.

ObjectRepository
createRepository(DocumentManager $documentManager, string $documentName)

Create a new repository instance for a document class.

ObjectRepository
instantiateRepository(string $repositoryClassName, DocumentManager $documentManager, ClassMetadata $metadata)

Instantiates requested repository.

Details

ObjectRepository getRepository(DocumentManager $documentManager, string $documentName)

Gets the repository for a document class.

Parameters

DocumentManager $documentManager The DocumentManager instance.
string $documentName The name of the document.

Return Value

ObjectRepository

protected ObjectRepository createRepository(DocumentManager $documentManager, string $documentName)

Create a new repository instance for a document class.

Parameters

DocumentManager $documentManager The DocumentManager instance.
string $documentName The name of the document.

Return Value

ObjectRepository

abstract protected ObjectRepository instantiateRepository(string $repositoryClassName, DocumentManager $documentManager, ClassMetadata $metadata)

Instantiates requested repository.

Parameters

string $repositoryClassName
DocumentManager $documentManager
ClassMetadata $metadata

Return Value

ObjectRepository