ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
CallbackHandler.php
Go to the documentation of this file.
1 <?php
7 namespace Whoops\Handler;
8 
10 
16 class CallbackHandler extends Handler
17 {
21  protected $callable;
22 
27  public function __construct($callable)
28  {
29  if (!is_callable($callable)) {
30  throw new InvalidArgumentException(
31  'Argument to ' . __METHOD__ . ' must be valid callable'
32  );
33  }
34 
35  $this->callable = $callable;
36  }
37 
41  public function handle()
42  {
43  $exception = $this->getException();
44  $inspector = $this->getInspector();
45  $run = $this->getRun();
47 
48  // invoke the callable directly, to get simpler stacktraces (in comparison to call_user_func).
49  // this assumes that $callable is a properly typed php-callable, which we check in __construct().
51  }
52 }
Whoops - php errors for cool kids.
Abstract implementation of a Handler.
Definition: Handler.php:15
Wrapper for Closures passed as handlers.