Files
liceo-ariosto/libraries/vendor/tobscure/json-api/src/Exception/Handler/ExceptionHandlerInterface.php
2025-06-17 11:53:18 +02:00

37 lines
791 B
PHP

<?php
/*
* This file is part of JSON-API.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tobscure\JsonApi\Exception\Handler;
use Exception;
interface ExceptionHandlerInterface
{
/**
* If the exception handler is able to format a response for the provided exception,
* then the implementation should return true.
*
* @param \Exception $e
*
* @return bool
*/
public function manages(Exception $e);
/**
* Handle the provided exception.
*
* @param \Exception $e
*
* @return \Tobscure\JsonApi\Exception\Handler\ResponseBag
*/
public function handle(Exception $e);
}