Controller
abstract class Controller (View source)
Properties
protected array | $beforeFilters | The "before" filters registered on the controller. |
|
protected array | $afterFilters | The "after" filters registered on the controller. |
|
static protected RouteFiltererInterface | $filterer | The route filterer implementation. |
|
protected View | $layout | The layout used by the controller. |
Methods
Register a "before" filter on the controller.
Register an "after" filter on the controller.
Register a controller instance method as a filter.
Determine if a filter is a local method on the controller.
Remove the given before filter.
Remove the given after filter.
Remove the given controller filter from the provided filter array.
Get the registered "before" filters.
Get the registered "after" filters.
Get the route filterer implementation.
Create the layout used by the controller.
Execute an action on the controller.
Handle calls to missing methods on the controller.
Handle calls to missing methods on the controller.
Details
void
beforeFilter(Closure|string $filter, array $options = array())
Register a "before" filter on the controller.
void
afterFilter(Closure|string $filter, array $options = array())
Register an "after" filter on the controller.
protected array
parseFilter(Closure|string $filter, array $options)
Parse the given filter and options.
protected string
registerClosureFilter(Closure $filter)
Register an anonymous controller filter Closure.
protected string
registerInstanceFilter(string $filter)
Register a controller instance method as a filter.
protected bool
isInstanceFilter(mixed $filter)
Determine if a filter is a local method on the controller.
void
forgetBeforeFilter(string $filter)
Remove the given before filter.
void
forgetAfterFilter(string $filter)
Remove the given after filter.
protected array
removeFilter(string $removing, array $current)
Remove the given controller filter from the provided filter array.
array
getBeforeFilters()
Get the registered "before" filters.
array
getAfterFilters()
Get the registered "after" filters.
static RouteFiltererInterface
getFilterer()
Get the route filterer implementation.
static void
setFilterer(RouteFiltererInterface $filterer)
Set the route filterer implementation.
protected void
setupLayout()
Create the layout used by the controller.
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.