# Server request handlers

Server request handlers implement the Psr\Http\Server\RequestHandlerInterface.

All request handlers contains only one public method Psr\Http\Server\RequestHandlerInterface::handle().

public function handle(
    Psr\Http\Message\ServerRequestInterface $request
): Psr\Http\Message\ResponseInterface;

# HttpSoft\Basis\Handler\NotFoundHandler

Generates a response with the 404 Not Found status according to the arguments passed to the constructor.

public function __construct(
    Psr\Http\Message\ResponseFactoryInterface $responseFactory,
    HttpSoft\Basis\TemplateRendererInterface $template,
    string $view, // Path to the view file.
    bool $debug = false
);

Source code on GitHub.

# HttpSoft\Basis\Handler\NotFoundJsonHandler

Generates a response with a 404 Not Found status in JSON format (HttpSoft\Response\JsonResponse).

public function __construct(bool $debug = false);

Source code on GitHub.