Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Created by PhpStorm.
- * User: renan
- * Date: 20/12/2014
- * Time: 15:03
- */
- namespace Market\Factory;
- use Market\Controller\PostController;
- use Zend\ServiceManager\FactoryInterface;
- use Zend\ServiceManager\ServiceLocatorInterface;
- class PostControllerFactory implements FactoryInterface
- {
- public function createService(ServiceLocatorInterface $controllerManager)
- {
- $serviceLocator = $controllerManager->getServiceLocator();
- $serviceManager = $serviceLocator->get('ServiceManager');
- $categories = $serviceManager->get('categories');
- $controller = new PostController();
- $controller->setCategories($categories);
- return $controller;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement