Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class My_Service {
- function create($data) {
- try {
- $this->getDao()->getMapper()->insert($data);
- } catch(Exception $e) {
- // How should I handle this exception?
- }
- }
- }
- class My_Controller {
- function indexAction() {
- $service = new My_Service();
- if($service->create(array())) {
- //display specific error
- };
- }
- }
Add Comment
Please, Sign In to add comment