Method | Description | |
---|---|---|
__construct ( callable $callback, Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response ) | Constructor | |
__get ( string $name ) : mixed | Allow retrieving the request, response and callback as properties | |
createServer ( callable $callback, array $server, array $query, array $body, array $cookies, array $files ) : static | Create a Server instance | |
createServerFromRequest ( callable $callback, Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response = null ) : static | Create a Server instance from an existing request object | |
listen ( callable $finalHandler = null ) | "Listen" to an incoming request | |
setEmitter ( Zend\Diactoros\Response\EmitterInterface $emitter ) | Set alternate response emitter to use. |
Method | Description | |
---|---|---|
getEmitter ( ) : Zend\Diactoros\Response\EmitterInterface | Retrieve the current response emitter. |
public __construct ( callable $callback, Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response ) | ||
$callback | callable | |
$request | Psr\Http\Message\ServerRequestInterface | |
$response | Psr\Http\Message\ResponseInterface |
public static createServerFromRequest ( callable $callback, Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response = null ) : static | ||
$callback | callable | |
$request | Psr\Http\Message\ServerRequestInterface | |
$response | Psr\Http\Message\ResponseInterface | |
return | static |
public setEmitter ( Zend\Diactoros\Response\EmitterInterface $emitter ) | ||
$emitter | Zend\Diactoros\Response\EmitterInterface |