Passed
Push — master ( 617c92...5e6e10 )
by Jean-Christophe
05:35
created

ControllerBase::initialize()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 3
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
crap 2
1
<?php
2
3
namespace Ubiquity\controllers;
4
5
use Ubiquity\utils\http\URequest;
6
7
abstract class ControllerBase extends Controller {
8
	protected $headerView="@framework/main/vHeader.html";
9
	protected $footerView="@framework/main/vFooter.html";
10
11 1
	public function initialize() {
12 1
		if (!URequest::isAjax()) {
13 1
			$this->loadView($this->headerView);
14
		}
15 1
	}
16
17 1
	public function finalize() {
18 1
		if (!URequest::isAjax()) {
19 1
			$this->loadView($this->footerView);
20
		}
21 1
	}
22
}
23
24