No Description

FatalErrorHandlerInterface.php 1.2KB

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Debug\FatalErrorHandler;
  11. use Symfony\Component\Debug\Exception\FatalErrorException;
  12. @trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.4, use "%s" instead.', FatalErrorHandlerInterface::class, \Symfony\Component\ErrorHandler\FatalErrorHandler\FatalErrorHandlerInterface::class), \E_USER_DEPRECATED);
  13. /**
  14. * Attempts to convert fatal errors to exceptions.
  15. *
  16. * @author Fabien Potencier <fabien@symfony.com>
  17. *
  18. * @deprecated since Symfony 4.4, use Symfony\Component\ErrorHandler\FatalErrorHandler\FatalErrorHandlerInterface instead.
  19. */
  20. interface FatalErrorHandlerInterface
  21. {
  22. /**
  23. * Attempts to convert an error into an exception.
  24. *
  25. * @param array $error An array as returned by error_get_last()
  26. *
  27. * @return FatalErrorException|null A FatalErrorException instance if the class is able to convert the error, null otherwise
  28. */
  29. public function handleError(array $error, FatalErrorException $exception);
  30. }