Ubiquity  2.0.0
php rapid development framework
ControllerBase.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Ubiquity\controllers;
4 
6 
7 abstract class ControllerBase extends Controller {
8  protected $headerView="main/vHeader.html";
9  protected $footerView="main/vFooter.html";
10 
11  public function initialize() {
12  if (!URequest::isAjax()) {
13  $this->loadView($this->headerView);
14  }
15  }
16 
17  public function finalize() {
18  if (!URequest::isAjax()) {
19  $this->loadView($this->footerView);
20  }
21  }
22 }
23 
loadView($viewName, $pData=NULL, $asString=false)
Loads the view $viewName possibly passing the variables $pdata.
Definition: Controller.php:64
Base class for controllers.
Definition: Controller.php:18
static isAjax()
Returns true if the request is an Ajax request.
Definition: URequest.php:83
This file is part of Ubiquity framework.