Ubiquity 2.5.2
php rapid development framework
|
Default controller displaying php views only with an async server (Swoole, workerman). More...
Public Member Functions | |
loadView (string $viewName, $pData=NULL, bool $asString=false) | |
Loads the php view $viewName possibly passing the variables $pdata. | |
Public Member Functions inherited from SimpleViewController | |
__construct () | |
Constructor initialize $view variable. | |
Public Member Functions inherited from Controller | |
index () | |
Default action. | |
initialize () | |
Method called before each action Can be override in derived class. | |
finalize () | |
Method called after each action Can be override in derived class. | |
loadDefaultView ($pData=null, bool $asString=false) | |
Loads the default view (controllerName/actionName) possibly passing the variables $pdata. | |
getDefaultViewName () | |
Returns the default view name for this controller/action i.e ControllerName/actionName.html for the action actionName in ControllerName If there is an activeTheme @activeTheme/ControllerName/actionName.html | |
isValid ($action) | |
Returns True if access to the controller is allowed To be override in sub classes. | |
onInvalidControl () | |
Called if isValid () returns false To be override in sub classes. | |
forward (string $controller, string $action='index', $params=[], bool $initialize=false, bool $finalize=false) | |
Loads the controller $controller and calls its $action method by passing the parameters $params. | |
redirectToRoute (string $routeName, $parameters=[], bool $initialize=false, bool $finalize=false) | |
Redirect to a route by its name. | |
getView () | |
Returns the associated view instance. | |
Protected Member Functions | |
_includeFileAsString ($filename, $pdata) | |
Static Protected Attributes | |
static | $views = [ ] |
Additional Inherited Members | |
Protected Attributes inherited from Controller | |
View | $view |
Default controller displaying php views only with an async server (Swoole, workerman).
Ubiquity\controllers$ControllerView This class is part of Ubiquity
Definition at line 14 of file SimpleViewAsyncController.php.
|
protected |
Reimplemented from SimpleViewController.
Definition at line 17 of file SimpleViewAsyncController.php.
loadView | ( | string | $viewName, |
$pData = NULL , |
|||
bool | $asString = false |
||
) |
Loads the php view $viewName possibly passing the variables $pdata.
string | $viewName | The name of the view to load |
mixed | $pData | Variable or associative array to pass to the view If a variable is passed, it will have the name $data in the view, If an associative array is passed, the view retrieves variables from the table's key names |
boolean | $asString | If true, the view is not displayed but returned as a string (usable in a variable) |
Exception
Reimplemented from SimpleViewController.
Definition at line 41 of file SimpleViewAsyncController.php.
|
staticprotected |
Definition at line 15 of file SimpleViewAsyncController.php.