Final Class Yiisoft\Yii\Debug\Viewer\NotFoundHandler
| Inheritance | Yiisoft\Yii\Debug\Viewer\NotFoundHandler |
|---|---|
| Implements | Psr\Http\Server\RequestHandlerInterface |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Yii\Debug\Viewer\NotFoundHandler | |
| handle() | Yiisoft\Yii\Debug\Viewer\NotFoundHandler |
Method Details
| public __construct( \Yiisoft\DataResponse\DataResponseFormatterInterface $formatter, \Yiisoft\DataResponse\DataResponseFactoryInterface $dataResponseFactory ): mixed | ||
| $formatter | \Yiisoft\DataResponse\DataResponseFormatterInterface | |
| $dataResponseFactory | \Yiisoft\DataResponse\DataResponseFactoryInterface | |
public function __construct(
private DataResponseFormatterInterface $formatter,
private DataResponseFactoryInterface $dataResponseFactory
) {
}
| public handle( \Psr\Http\Message\ServerRequestInterface $request ): \Psr\Http\Message\ResponseInterface | ||
| $request | \Psr\Http\Message\ServerRequestInterface | |
public function handle(ServerRequestInterface $request): ResponseInterface
{
return $this->formatter->format(
$this->dataResponseFactory->createResponse('Page not found', Status::NOT_FOUND)
);
}
Signup or Login in order to comment.