Page
class Page extends UserInterface (View source)
Traits
Properties
protected Application | $app | from ApplicationAwareTrait | |
protected string[] | $helpers | The handles of the helpers to be returned by the getHelperObjects method. | from AbstractController |
protected array | $sets | The values to be sent to views. | from AbstractController |
protected string|null | $action | The action to be performed. | from AbstractController |
protected Request|null | $request | The current request instance. | from AbstractController |
protected array|null | $parameters | The action parameters. | from AbstractController |
protected | $view | from Controller | |
protected | $viewPath | from Controller | |
protected | $theme | from Controller | |
protected | $controllerActionPath | from Controller | |
protected | $themeViewTemplate | from Controller | |
protected ErrorList | $error | The current errors container. | from UserInterface |
protected string|null | $validationToken | An identifier to be used when checking tokens. | from UserInterface |
protected Page | $page | ||
protected Permissions | $permissions |
Methods
Adds an item to the view's header. This item will then be automatically printed out before the
section of the page.Adds an item to the view's footer. This item will then be automatically printed out before the section of the page.
Should the action be executed? Override this method to answer something different than true.
Get the the helpers that will be be automatically sent to Views as variables.
Get the whole $_GET array or a specific querystring value.
Override this method to perform controller initializations.
Override this method to do something right before the view is rendered.
Get the whole $_POST array or a specific posted value.
Redirect the clients to a specific URL/page (specify path(s) as argument(s) of this function).
Perform an action of this controller (if shouldRunControllerTask returns true).
Get the whole $_REQUEST array or a specific requested value.
No description
Check whether the token is valid and if the current page be accessed.
No description
Details
in ApplicationAwareTrait at line 19
setApplication(Application $app)
Setter method for the application
in UserInterface at line 27
__construct()
Initialize the instance.
in AbstractController at line 67
Request
getRequest()
Get the current request instance.
in AbstractController at line 81
setRequest(Request $request)
Set the current request instance.
in AbstractController at line 92
requireAsset()
Add an asset required in views.
This function accept the same parameters as the requireAsset method of the ResponseAssetGroup.
in AbstractController at line 104
addHeaderItem(string $item)
Adds an item to the view's header. This item will then be automatically printed out before the
section of the page.
in AbstractController at line 115
addFooterItem(string $item)
Adds an item to the view's footer. This item will then be automatically printed out before the section of the page.
in AbstractController at line 127
set(string $key, mixed $val)
Set a value to be sent to the view.
in AbstractController at line 137
array
getSets()
Get the values to be sent to views.
in UserInterface at line 45
bool
shouldRunControllerTask()
Should the action be executed? Override this method to answer something different than true.
in AbstractController at line 158
array
getHelperObjects()
Get the the helpers that will be be automatically sent to Views as variables.
Array keys are the variable names, array values are the helper instances.
in AbstractController at line 177
mixed
get(string|null $key = null, mixed $defaultValue = null)
Get the whole $_GET array or a specific querystring value.
in AbstractController at line 195
getTask()
deprecated
deprecated
in AbstractController at line 205
string|null
getAction()
Get the action to be performed.
in AbstractController at line 215
array|null
getParameters()
Get the action parameters.
at line 15
on_start()
Override this method to perform controller initializations.
in AbstractController at line 231
on_before_render()
Override this method to do something right before the view is rendered.
For instance, you can call $this->set('variableName', $variableValue) to send the view additional sets.
in AbstractController at line 238
isPost()
deprecated
deprecated
in AbstractController at line 251
mixed
post(string|null $key = null, mixed $defaultValue = null)
Get the whole $_POST array or a specific posted value.
in AbstractController at line 261
redirect()
deprecated
deprecated
Redirect the clients to a specific URL/page (specify path(s) as argument(s) of this function).
in AbstractController at line 275
runTask(mixed $action, mixed $parameters)
deprecated
deprecated
in AbstractController at line 288
mixed
runAction(string $action, array $parameters = [])
Perform an action of this controller (if shouldRunControllerTask returns true).
in AbstractController at line 306
mixed
request(string|null $key = null)
Get the whole $_REQUEST array or a specific requested value.
in Controller at line 19
setViewObject(AbstractView $view)
in Controller at line 24
setTheme($mixed)
in Controller at line 33
getTheme()
in Controller at line 47
setThemeViewTemplate($template)
in Controller at line 51
getThemeViewTemplate()
in Controller at line 67
getControllerActionPath()
in Controller at line 91
flash($key, $value, $isHTML = false)
in UserInterface at line 55
getViewObject()
at line 43
action()
in UserInterface at line 82
abstract protected bool
canAccess()
Can the current page be accessed?
in UserInterface at line 89
protected bool
validateAction()
Check whether the token is valid and if the current page be accessed.