| 1 |
<?php |
| 2 |
|
| 3 |
namespace Symfony\Component\Debug\Tests\Fixtures; |
| 4 |
|
| 5 |
class ErrorHandlerThatUsesThePreviousOne |
| 6 |
{ |
| 7 |
private static $previous; |
| 8 |
|
| 9 |
public static function register() |
| 10 |
{ |
| 11 |
$handler = new static(); |
| 12 |
|
| 13 |
self::$previous = set_error_handler([$handler, 'handleError']); |
| 14 |
|
| 15 |
return $handler; |
| 16 |
} |
| 17 |
|
| 18 |
public function handleError() |
| 19 |
{ |
| 20 |
return \call_user_func_array(self::$previous, \func_get_args()); |
| 21 |
} |
| 22 |
} |
| 23 |
|