class DefaultRepositoryFactory extends AbstractRepositoryFactory (View source)

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

Methods

getRepository(DocumentManager $documentManager, string $documentName)

Gets the repository for a document class.

ObjectRepository|GridFSRepository
createRepository(DocumentManager $documentManager, string $documentName)

Create a new repository instance for a document class.

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

Instantiates requested repository.

Details

getRepository(DocumentManager $documentManager, string $documentName)

Gets the repository for a document class.

Parameters

DocumentManager $documentManager
string $documentName

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

Create a new repository instance for a document class.

Parameters

DocumentManager $documentManager
string $documentName

Return Value

ObjectRepository|GridFSRepository

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

Instantiates requested repository.

Parameters

string $repositoryClassName
DocumentManager $documentManager
ClassMetadata $metadata