Created
August 19, 2013 11:31
-
-
Save MichaelGooden/6268144 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 | |
'factories' => array( | |
'My\Service\BankAccount' => function($serviceManager) { | |
$bankAccountService = new My\Service\BankAccount($serviceManager->get('Doctrine\ORM\EntityManager')->getRepository('My\Entity\BankAccount')); | |
return $bankAccountService; | |
}, | |
), |
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 | |
public function indexAction() { | |
$service = $this->getServiceLocator()->get('My\Service\BankAccount'); | |
return new ViewModel(array('account' => $service->find($id))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment