Zend Framework  3.0
Static Public Member Functions | List of all members
Utils Class Reference

Utility methods. More...

Static Public Member Functions

static getArity ($callable)
 Get the arity of a handler.
 
static getStatusCode ($error, ResponseInterface $response)
 Determine status code from an error and/or response.
 

Detailed Description

Utility methods.

Member Function Documentation

static getArity (   $callable)
static

Get the arity of a handler.

Parameters
string | callable | object$callable
Returns
int
static getStatusCode (   $error,
ResponseInterface  $response 
)
static

Determine status code from an error and/or response.

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.

Parameters
mixed$error
ResponseInterface$response
Returns
int