class Controller (View source)

Methods

middleware( array|string $middleware, array $options = array())

Register middleware on the controller.

array
getMiddleware()

Get the middleware assigned to the controller.

static  Router
getRouter()

Get the router instance.

static  void
setRouter( Router $router)

Set the router instance.

Response
callAction( string $method, array $parameters)

Execute an action on the controller.

mixed
missingMethod( array $parameters = array())

Handle calls to missing methods on the controller.

mixed
__call( string $method, array $parameters)

Handle calls to missing methods on the controller.

Details

at line line 31
ControllerMiddlewareOptions middleware( array|string $middleware, array $options = array())

Register middleware on the controller.

Parameters

array|string $middleware
array $options

Return Value

ControllerMiddlewareOptions

at line line 45
array getMiddleware()

Get the middleware assigned to the controller.

Return Value

array

at line line 55
static Router getRouter()

Get the router instance.

Return Value

Router

at line line 66
static void setRouter( Router $router)

Set the router instance.

Parameters

Router $router

Return Value

void

at line line 78
Response callAction( string $method, array $parameters)

Execute an action on the controller.

Parameters

string $method
array $parameters

Return Value

Response

at line line 91
mixed missingMethod( array $parameters = array())

Handle calls to missing methods on the controller.

Parameters

array $parameters

Return Value

mixed

Exceptions

NotFoundHttpException

at line line 105
mixed __call( string $method, array $parameters)

Handle calls to missing methods on the controller.

Parameters

string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException