Welcome Guest, Not a member yet? Register   Sign In
Abort execution and call _output() method
#4

[eluser]zauber[/eluser]
Glad it helped!

Not sure if you're asking me how to deal with the $controller parameter, but If you need it in the "_exit_handler" according to my example, you can just set it
on the exception and use it in the exception handler later.

So...

Code:
function _exit($controller) {
  $exit = new Exception(); //maybe should use custom class here, but whatever...
  $exit->controller = $controller;
  set_exception_handler(array($this, '_exit_handler'));
  throw $exit;
}

function _exit_handler($exit) {
  $controller = $exit->controller;
  //do something with controller...
}


Messages In This Thread
Abort execution and call _output() method - by El Forum - 10-01-2012, 08:04 AM
Abort execution and call _output() method - by El Forum - 10-01-2012, 03:13 PM
Abort execution and call _output() method - by El Forum - 10-01-2012, 03:49 PM
Abort execution and call _output() method - by El Forum - 10-01-2012, 03:58 PM
Abort execution and call _output() method - by El Forum - 10-01-2012, 04:46 PM



Theme © iAndrew 2016 - Forum software by © MyBB