Last active
August 29, 2015 14:02
-
-
Save eminetto/b6487feb6f0de85ada38 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
'service_manager' => array( | |
'abstract_factories' => array( | |
'Zend\Cache\Service\StorageCacheAbstractServiceFactory', | |
'Zend\Log\LoggerAbstractServiceFactory', | |
), | |
'aliases' => array( | |
'translator' => 'MvcTranslator', | |
), | |
'factories' => array( | |
'Application\Model\PostTableGateway' => function($sm) { | |
$dbAdapter = $sm->get('Zend\Db\Adapter\Adapter'); | |
$resultSetPrototype = new Zend\Db\ResultSet\ResultSet(); | |
$resultSetPrototype->setArrayObjectPrototype(new Application\Model\Post()); | |
$tableGateway = new Zend\Db\TableGateway\TableGateway('posts', $dbAdapter, null, $resultSetPrototype); | |
$postTableGateway = new Application\Model\PostTableGateway($tableGateway); | |
return $postTableGateway; | |
}, | |
), | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment