PHP Class Psr7Middlewares\Middleware\MethodOverride

Afficher le fichier Open project: oscarotero/psr7-middlewares

Méthodes publiques

Méthode Description
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface Execute the middleware.
get ( array $methods ) : self Set allowed method for GET.
parameter ( string $name, boolean $get = true ) : self Configure the parameters.
post ( array $methods ) : self Set allowed method for POST.

Private Methods

Méthode Description
getAllowedOverrideMethods ( Psr\Http\Message\ServerRequestInterface $request ) : array Returns the allowed override methods.
getOverrideMethod ( Psr\Http\Message\ServerRequestInterface $request ) : string Returns the override method.

Method Details

__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

get() public méthode

Set allowed method for GET.
public get ( array $methods ) : self
$methods array
Résultat self

parameter() public méthode

Configure the parameters.
public parameter ( string $name, boolean $get = true ) : self
$name string
$get boolean
Résultat self

post() public méthode

Set allowed method for POST.
public post ( array $methods ) : self
$methods array
Résultat self