| 1 | <?php | ||
| 13 | class RepositoryFactoryConfigurator | ||
| 14 | { | ||
| 15 | private $metadatas; | ||
| 16 | private $repositories; | ||
| 17 | |||
| 18 | 2 | public function __construct(Metadatas $metadatas) | |
| 23 | |||
| 24 | /** | ||
| 25 | * Register a newrepository for the given entity class | ||
| 26 | * | ||
| 27 | * @param string $class | ||
| 28 | * @param RepositoryInterface $repository | ||
| 29 | * | ||
| 30 | * @return self | ||
| 31 | */ | ||
| 32 | 1 | public function register(string $class, RepositoryInterface $repository): self | |
| 38 | |||
| 39 | /** | ||
| 40 | * Inject registered repositories into the given repository factory | ||
| 41 | * | ||
| 42 | * @param RepositoryFactory $factory | ||
| 43 | * | ||
| 44 | * @return RepositoryFactory | ||
| 45 | */ | ||
| 46 | 2 | public function configure(RepositoryFactory $factory): RepositoryFactory | |
| 64 | } | ||
| 65 |