Created
June 5, 2013 00:51
-
-
Save eminetto/5710850 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
public function getServiceConfig() | |
{ | |
return array( | |
'factories' => array( | |
'Application\Model\Item' => function($sm) { | |
return new Item(); | |
}, | |
'ItemTableGateway' => function($sm) { | |
$dbAdapter = $sm->get('Zend\Db\Adapter\Adapter'); | |
$resultSetPrototype = new ResultSet(); | |
$resultSetPrototype->setArrayObjectPrototype($sm->get('Application\Model\Item')); | |
$tableGateway = new TableGateway('item', $dbAdapter, null, $resultSetPrototype); | |
$table = new ItemTable($tableGateway); | |
return $table; | |
}, | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment