Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 511 Bytes

RouteRequestHandler.md

File metadata and controls

24 lines (16 loc) · 511 Bytes

RouteRequestHandler

Methods

handle

<?php

use Chubbyphp\Framework\Middleware\MiddlewareDispatcher;
use Chubbyphp\Framework\RequestHandler\RouteRequestHandler;
use Psr\Http\Message\ServerRequestInterface;
use Some\Psr7\Response;
use Some\Psr7\ServerRequest;

$request = new ServerRequest();
$response = new Response();

$middlewareDispatcher = new MiddlewareDispatcher();

$callbackHandler = new RouteRequestHandler($middlewareDispatcher);

$response = $callbackHandler->handle($request);