| 1 | <?php |
||
| 11 | class RepositoryFactory implements RepositoryFactoryInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Container to retrieve repositories from. |
||
| 15 | * |
||
| 16 | * @var ContainerInterface |
||
| 17 | */ |
||
| 18 | private $container; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Map of fully qualified entity class names => service IDs. |
||
| 22 | * |
||
| 23 | * @var string[] |
||
| 24 | */ |
||
| 25 | private $fqcnToServiceIdMap; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * The repository factory to fallback to if the entity is not configured |
||
| 29 | * as a service. |
||
| 30 | * |
||
| 31 | * @var RepositoryFactoryInterface |
||
| 32 | */ |
||
| 33 | private $fallback; |
||
| 34 | |||
| 35 | public function __construct(ContainerInterface $container, array $fqcnToServiceIdMap, RepositoryFactoryInterface $fallback) |
||
| 41 | |||
| 42 | public function getRepository(EntityManagerInterface $entityManager, $entityName) |
||
| 52 | } |
||
| 53 |