class RestrictedController extends Controller

Implements support for the Restricted controller. Interactions that the user performs that are restricted will result in a relevant view being rendered.

Properties

$request from  Controller
$view from  Controller

Methods

__construct(string $controller, string $action)

Constructor for the parent Controller class. This constructor gets called when an instance of the child class is instantiated.

void
onConstruct()

Runs when the object is constructed.

void
badTokenAction()

Renders page when a bad csrf token is detected.

void
indexAction()

This controller's default action.

void
noControllerAction(string $controllerName)

Handles case when controller is not found and sets 404 response.

void
notFoundAction(string $actionName, string $controllerName)

Handles cases when view is not found and sets 404 response.

Details

in Controller at line 27
__construct(string $controller, string $action)

Constructor for the parent Controller class. This constructor gets called when an instance of the child class is instantiated.

Parameters

string $controller

The name of the controller obtained while parsing the URL.

string $action

The name of the action specified in the path of the URL.

at line 66
void onConstruct()

Runs when the object is constructed.

Return Value

void

at line 17
void badTokenAction()

Renders page when a bad csrf token is detected.

Return Value

void

at line 27
void indexAction()

This controller's default action.

Return Value

void

at line 37
void noControllerAction(string $controllerName)

Handles case when controller is not found and sets 404 response.

Parameters

string $controllerName

The name of the controller.

Return Value

void

at line 52
void notFoundAction(string $actionName, string $controllerName)

Handles cases when view is not found and sets 404 response.

Parameters

string $actionName

The name of the action/view.

string $controllerName

The name of the controller.

Return Value

void