I am currently using a forward404 or forward404Unless with the following code:
protected function forward404(){
$this->dispatcher->forward(
array(
'controller' => 'error',
'action' => 'error404'
)
);
}
protected function forward404Unless($what){
if(!$what) $this->forward404();
}
The problem that i have is that i need to stop the execution of the current action and pass to the new one (404):
public function addAction(){
$this->forward404Unless($this->request->get('user_id'));
$this->forward404Unless($user = \Zero\Models\User::findFirstByUserId($this->request->get('user_id')));
Any suggestions on how to stop the execution of any action?