TestRepositoryFactory
in package
implements
RepositoryFactory
Tags
Interfaces, Classes, Traits and Enums
- RepositoryFactory
- Interface for entity repository factory.
Table of Contents
- $repositoryList : array<string|int, ObjectRepository>
- getRepository() : ObjectRepository
- Gets the repository for an entity class.
- setRepository() : mixed
- createRepository() : ObjectRepository
- getRepositoryHash() : string
Properties
$repositoryList
private
array<string|int, ObjectRepository>
$repositoryList
= []
Methods
getRepository()
Gets the repository for an entity class.
public
getRepository(EntityManagerInterface $entityManager, mixed $entityName) : ObjectRepository
Parameters
- $entityManager : EntityManagerInterface
-
The EntityManager instance.
- $entityName : mixed
-
The name of the entity.
Return values
ObjectRepository —setRepository()
public
setRepository(EntityManagerInterface $entityManager, string $entityName, ObjectRepository $repository) : mixed
Parameters
- $entityManager : EntityManagerInterface
- $entityName : string
- $repository : ObjectRepository
Return values
mixed —createRepository()
private
createRepository(EntityManagerInterface $entityManager, string $entityName) : ObjectRepository
Parameters
- $entityManager : EntityManagerInterface
- $entityName : string
Return values
ObjectRepository —getRepositoryHash()
private
getRepositoryHash(EntityManagerInterface $entityManager, string $entityName) : string
Parameters
- $entityManager : EntityManagerInterface
- $entityName : string