public function createService(ServiceLocatorInterface $serviceLocator)
 {
     $categories = $serviceLocator->getServiceLocator()->get('categories');
     $postController = new \Market\Controller\PostController();
     $postController->setCategories($categories);
     return $postController;
 }
 public function createService(ServiceLocatorInterface $controllerManager)
 {
     $allServices = $controllerManager->getServiceLocator();
     $sm = $allServices->get('ServiceManager');
     $categories = $sm->get('categories');
     $postController = new \Market\Controller\PostController();
     $postController->setCategories($categories);
     $postController->setPostForm($sm->get('market-post-form'));
     $postController->setListingsTable($sm->get('listings-table'));
     return $postController;
 }