Class Controller
Class Controller acts as a stepping stone (or "intermediate agent") between the user-defined code (/src/controllers/) and the system-defined code (ParentController) that helps to better structure the code. See @example
- Core\ParentController
-
Controller
Direct known subclasses
HomeController
Example:
Located at src/controllers/Controller.php
// To avoid: FooController->showProducts(); // and BarController->showProducts(); // to be defined twice (one in each controller) or once (in ParentController, bad code practices) Controller->showProducts(); // can be defined and thus accessed from both <b>Foo</b> and <b>Bar</b> Controllers.
Located at src/controllers/Controller.php
public static
|
|
public
|
add(),
addFooter(),
addHeader(),
addJSVar(),
addScript(),
addStyle(),
asset(),
cache(),
compressWithMinify(),
get(),
getGet(),
getModel(),
getPost(),
header(),
json(),
minimize(),
minimizeURL(),
path(),
redirect(),
setFavicon(),
setTitle(),
show(),
url()
|
protected
|
$model
The instance of Model. |
$ajax,
$config,
$hooks,
$path,
$templatePath,
$vars,
$viewPath
|