RestrictedController
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
| protected string | $_action | The name of the current action. |
from Controller |
| protected string | $_controller | The name of the current controller. |
from Controller |
| Input | $request | Instance of Input class that performs much of our request tasks. |
from Controller |
| View | $view | Instance of view class. |
from Controller |
Methods
Calls functions for reporting and unregister of globals.
Manages the displaying of error messages and other reporting for this application.
Captures the current View instance during testing so that test assertions (e.g., assertViewContains) can access view-bound variables.
Runs when the object is constructed.
Renders page when a bad csrf token is detected.
This controller's default action.
Handles case when controller is not found and sets 404 response.
Handles cases when view is not found and sets 404 response.
Details
in
Controller at line 47
__construct(string $controller, string $action)
Calls functions for reporting and unregister of globals.
in
Application at line 23
private void
_set_reporting()
Manages the displaying of error messages and other reporting for this application.
in
Controller at line 67
protected void
logViewForTesting(View $view)
Captures the current View instance during testing so that test assertions (e.g., assertViewContains) can access view-bound variables.
This method should be called in controller actions before rendering a view. It stores the View object in ApplicationTestCase::$controllerOutput['view'] when the application is running in the 'testing' environment.
at line 66
void
onConstruct()
Runs when the object is constructed.
at line 17
void
badTokenAction()
Renders page when a bad csrf token is detected.
at line 27
void
indexAction()
This controller's default action.
at line 37
void
noControllerAction(string $controllerName)
Handles case when controller is not found and sets 404 response.
at line 52
void
notFoundAction(string $actionName, string $controllerName)
Handles cases when view is not found and sets 404 response.