Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace Blog\Factory;
- use Blog\Controller\ListController;
- use Blog\Model\PostRepositoryInterface;
- use Interop\Container\ContainerInterface;
- use Zend\ServiceManager\Factory\FactoryInterface;
- class ListControllerFactory implements FactoryInterface
- {
- /**
- * @param ContainerInterface $container
- * @param string $requestedName
- * @param null|array $options
- * @return ListController
- */
- public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
- {
- return new ListController($container->get(PostRepositoryInterface::class));
- }
- }
Add Comment
Please, Sign In to add comment