PHP Class Ergo\Middleware

See also: Ergo\Application::middleware()
Show file Open project: 99designs/ergo

Protected Properties

Property Type Description
$application
$controller

Public Methods

Method Description
__construct ( $controller, $application ) Constructor
execute ( $request ) : Ergo\Http\Response Handles a {@link Ergo\Http\Request}, returns an {@link Ergo\Http\Response}

Protected Methods

Method Description
filterResponse ( $request, $type = "text/*", $callback ) Helper to modify the response via a callback

Method Details

__construct() public method

Constructor
public __construct ( $controller, $application )

execute() public method

Handles a {@link Ergo\Http\Request}, returns an {@link Ergo\Http\Response}
public execute ( $request ) : Ergo\Http\Response
return Ergo\Http\Response

filterResponse() protected method

Helper to modify the response via a callback
protected filterResponse ( $request, $type = "text/*", $callback )

Property Details

$application protected property

protected $application

$controller protected property

protected $controller