Completed
Push — master ( 39e907...8bcc1d )
by Jean-Christophe
01:42
created

ControllerBase::initialize()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
dl 0
loc 5
rs 9.4285
c 1
b 1
f 0
cc 2
eloc 3
nc 2
nop 0
1
<?php
2
3
namespace Ubiquity\controllers;
4
5
use Ubiquity\utils\RequestUtils;
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 (!RequestUtils::isAjax()) {
13
			$this->loadView($this->headerView);
14
		}
15
	}
16
17
	public function finalize() {
18
		if (!RequestUtils::isAjax()) {
19
			$this->loadView($this->footerView);
20
		}
21
	}
22
}
23
24