PHP Class Psr7Middlewares\Middleware\EncodingNegotiator

Inheritance: use trait Psr7Middlewares\Utils\NegotiateTrait, use trait Psr7Middlewares\Utils\AttributeTrait
Afficher le fichier Open project: oscarotero/psr7-middlewares Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( array $encodings = null ) Constructor. Defines de available encodings.
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface Execute the middleware.
encodings ( array $encodings ) : self Configure the available encodings.
getEncoding ( Psr\Http\Message\ServerRequestInterface $request ) : string | null Returns the encoding.

Method Details

__construct() public méthode

Constructor. Defines de available encodings.
public __construct ( array $encodings = null )
$encodings array

__invoke() public méthode

Execute the middleware.
public __invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface
$request Psr\Http\Message\ServerRequestInterface
$response Psr\Http\Message\ResponseInterface
$next callable
Résultat Psr\Http\Message\ResponseInterface

encodings() public méthode

Configure the available encodings.
public encodings ( array $encodings ) : self
$encodings array
Résultat self

getEncoding() public static méthode

Returns the encoding.
public static getEncoding ( Psr\Http\Message\ServerRequestInterface $request ) : string | null
$request Psr\Http\Message\ServerRequestInterface
Résultat string | null