Created
March 27, 2013 07:43
-
-
Save nclundsten/5252459 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Market\Factory; | |
use Market\Controller\PostController; | |
use Zend\ServiceManager\FactoryInterface; | |
use Zend\ServiceManager\ServiceLocatorInterface; | |
class PostControllerFactory implements FactoryInterface | |
{ | |
public function createService(ServiceLocatorInterface $controllers) | |
{ | |
$allServices = $controllers->getServiceLocator(); | |
$sm = $allServices->get('ServiceManager'); | |
$controller = new PostController(); | |
$controller->setListingsTable($sm->get('listings-table')); | |
$controller->setCityCodesTable($sm->get('city-codes-table')); | |
$controller->setPostForm($sm->get('post-form')); | |
$controller->setPostFormFilter($sm->get('post-form-filter')); | |
$controller->setMailTransport($sm->get('mail-transport')); | |
$controller->setEmailInfo($sm->get('email-info')); | |
$controller->setParams($sm->get('params')); | |
$controller->setCategories($sm->get('categories')); | |
return $controller; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment