PHP Class Equip\Handler\ExceptionHandler

Show file Open project: equip/framework

Public Methods

Method Description
__construct ( ExceptionHandlerPreferences $preferences, Negotiator $negotiator, Relay\ResolverInterface $resolver, Whoops\Run $whoops, Psr\Log\LoggerInterface $logger = null )
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface

Private Methods

Method Description
handler ( string $type ) : Whoops\Handler\HandlerInterface Retrieve the handler to use for the given type
type ( Psr\Http\Message\ServerRequestInterface $request ) : string Determine the preferred content type for the current request

Method Details

__construct() public method

public __construct ( ExceptionHandlerPreferences $preferences, Negotiator $negotiator, Relay\ResolverInterface $resolver, Whoops\Run $whoops, Psr\Log\LoggerInterface $logger = null )
$preferences ExceptionHandlerPreferences
$negotiator Negotiation\Negotiator
$resolver Relay\ResolverInterface
$whoops Whoops\Run
$logger Psr\Log\LoggerInterface

__invoke() public method

public __invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface
$request Psr\Http\Message\ServerRequestInterface
$response Psr\Http\Message\ResponseInterface
$next callable
return Psr\Http\Message\ResponseInterface