tikiwiki/packages/tiki-pkg-expose/symfony/debug/Tests/Fixtures/ErrorHandlerThatUsesThePreviousOne.php

23 lines
436 B
PHP
Raw Normal View History

2023-11-20 21:52:04 +01:00
<?php
namespace Symfony\Component\Debug\Tests\Fixtures;
class ErrorHandlerThatUsesThePreviousOne
{
private static $previous;
public static function register()
{
$handler = new static();
self::$previous = set_error_handler([$handler, 'handleError']);
return $handler;
}
public function handleError()
{
return \call_user_func_array(self::$previous, \func_get_args());
}
}