Re: returning or exiting from methods of controllers

2009-05-18 Thread brian
It depends. If the method is not an action, but a private method called from within the controller (eg. $this->__whatever()) then returning false is a good idea. It really depends on wht you want from the method. If it's an action (ie. called directly through the request) you're better off settin

returning or exiting from methods of controllers

2009-05-18 Thread Brian Lee
In methods of controllers, there are usually many checks for "doing the right thing". For instance, I check if user is accessing the right data. However, I'm wondering what is the best way to return or exit from these methods when errors do occur. I've been using just simple return statement, bu