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

ControllerBase   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 4
lcom 1
cbo 2
dl 0
loc 16
rs 10
c 1
b 1
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 5 2
A finalize() 0 5 2
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