Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
ControllerBase.php
Go to the documentation of this file.
1<?php
2
4
6
16abstract class ControllerBase extends Controller {
17 protected string $headerView = '@activeTheme/main/vHeader.html';
18 protected string $footerView = '@activeTheme/main/vFooter.html';
19
20 public function initialize() {
21 if (! URequest::isAjax ()) {
22 $this->loadView ( $this->headerView );
23 }
24 }
25
26 public function finalize() {
27 if (! URequest::isAjax ()) {
28 $this->loadView ( $this->footerView );
29 }
30 }
31}
32
Default controller used in a new project.
initialize()
Method called before each action Can be override in derived class.
finalize()
Method called after each action Can be override in derived class.
Base class for controllers.
loadView(string $viewName, $pData=null, bool $asString=false)
Loads the view $viewName possibly passing the variables $pdata.
Http Request utilities, wrapper for accessing to $_GET, $_POST and php://input.
Definition URequest.php:18