class DefaultRepositoryFactory extends AbstractRepositoryFactory (View source)

This factory is used to create default repository objects for documents at runtime.

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($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

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

Instantiates requested repository.

Parameters

$repositoryClassName
DocumentManager $documentManager
ClassMetadata $metadata

Return Value

ObjectRepository