conferencetools /
checkin-module
| 1 | <?php |
||
| 2 | |||
| 3 | namespace ConferenceTools\Checkin\Controller; |
||
| 4 | |||
| 5 | use Carnage\Cqorms\Persistence\ReadModel\DoctrineRepository; |
||
| 6 | use Carnage\Cqrs\Command\CommandBusInterface; |
||
| 7 | use ConferenceTools\Checkin\Domain\ReadModel\Delegate; |
||
| 8 | use Doctrine\ORM\EntityManager; |
||
| 9 | use Interop\Container\ContainerInterface; |
||
| 10 | use Zend\ServiceManager\FactoryInterface; |
||
| 11 | use Zend\ServiceManager\ServiceLocatorInterface; |
||
| 12 | |||
| 13 | class CheckInControllerFactory implements FactoryInterface |
||
| 14 | { |
||
| 15 | public function createService(ServiceLocatorInterface $serviceLocator, $cName = null, $rName = null) |
||
| 16 | { |
||
| 17 | return $this($serviceLocator->getServiceLocator(), $rName); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 18 | } |
||
| 19 | |||
| 20 | public function __invoke(ContainerInterface $container, $name, $options = []) |
||
| 21 | { |
||
| 22 | return new CheckInController( |
||
| 23 | $container->get(CommandBusInterface::class), |
||
| 24 | new DoctrineRepository(Delegate::class, $container->get(EntityManager::class)) |
||
| 25 | ); |
||
| 26 | } |
||
| 27 | } |