Controller
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
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. | |
array | parseFilter(Closure|string $filter, array $options) Parse the given filter and options. | |
string | registerClosureFilter(Closure $filter) Register an anonymous controller filter Closure. | |
string | registerInstanceFilter(string $filter) Register a controller instance method as a filter. | |
boolean | 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. | |
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. | |
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. |
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 boolean 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.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/4.2/Illuminate/Routing/Controller.html