sathyashrayan

/Blog/src/Factory/ListControllerFactory.php

Jul 2nd, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.59 KB | None | 0 0
  1. <?php
  2. namespace Blog\Factory;
  3.  
  4. use Blog\Controller\ListController;
  5. use Blog\Model\PostRepositoryInterface;
  6. use Interop\Container\ContainerInterface;
  7. use Zend\ServiceManager\Factory\FactoryInterface;
  8.  
  9. class ListControllerFactory implements FactoryInterface
  10. {
  11.     /**
  12.      * @param ContainerInterface $container
  13.      * @param string $requestedName
  14.      * @param null|array $options
  15.      * @return ListController
  16.      */
  17.     public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
  18.     {
  19.         return new ListController($container->get(PostRepositoryInterface::class));
  20.     }
  21. }
Add Comment
Please, Sign In to add comment