PHP Class Zend\Stratigility\Utils

Afficher le fichier Open project: zendframework/zend-stratigility Class Usage Examples

Méthodes publiques

Méthode Description
getArity ( string | callable | object $callable ) : integer Get the arity of a handler
getStatusCode ( mixed $error, Psr\Http\Message\ResponseInterface $response ) : integer Determine status code from an error and/or response.

Method Details

getArity() public static méthode

Get the arity of a handler
public static getArity ( string | callable | object $callable ) : integer
$callable string | callable | object
Résultat integer

getStatusCode() public static méthode

If the error is an exception with a code between 400 and 599, returns the exception code. Otherwise, retrieves the code from the response; if not present, or less than 400 or greater than 599, returns 500; otherwise, returns it.
public static getStatusCode ( mixed $error, Psr\Http\Message\ResponseInterface $response ) : integer
$error mixed
$response Psr\Http\Message\ResponseInterface
Résultat integer