PHP Class Flarum\Http\Middleware\HandleErrors

Inheritance: implements Zend\Stratigility\ErrorMiddlewareInterface
Datei anzeigen Open project: flarum/core

Protected Properties

Property Type Description
$debug boolean
$logger Psr\Log\LoggerInterface
$templateDir string

Public Methods

Method Description
__construct ( string $templateDir, Psr\Log\LoggerInterface $logger, boolean $debug = false )
__invoke ( $error, Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $out = null )

Protected Methods

Method Description
getErrorPage ( string $status ) : string

Method Details

__construct() public method

public __construct ( string $templateDir, Psr\Log\LoggerInterface $logger, boolean $debug = false )
$templateDir string
$logger Psr\Log\LoggerInterface
$debug boolean

__invoke() public method

public __invoke ( $error, Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $out = null )
$request Psr\Http\Message\ServerRequestInterface
$response Psr\Http\Message\ResponseInterface
$out callable

getErrorPage() protected method

protected getErrorPage ( string $status ) : string
$status string
return string

Property Details

$debug protected_oe property

protected bool $debug
return boolean

$logger protected_oe property

protected LoggerInterface,Psr\Log $logger
return Psr\Log\LoggerInterface

$templateDir protected_oe property

protected string $templateDir
return string