Passed
Push — master ( dfeadf...0d8182 )
by Jean-Christophe
04:51
created

AuthFiles::getViewBaseTemplate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Ubiquity\controllers\Auth;
4
5
class AuthFiles {
6
	protected $viewBase;
7
	
8 1
	public function __construct(){
9 1
		$this->viewBase="@framework/auth";
10 1
	}
11
	
12
	/**
13
	 * To override
14
	 * The login view
15
	 * @return string
16
	 */
17
	public function getViewIndex() {
18
		return $this->viewBase."/index.html";
19
	}
20
	
21
	/**
22
	 * To override
23
	 * The info view, displays the connected user and a logout button
24
	 * @return string
25
	 */
26
	public function getViewInfo() {
27
		return $this->viewBase."/info.html";
28
	}
29
	
30
	/**
31
	 * To override
32
	 * @return string
33
	 */
34
	public function getViewNoAccess() {
35
		return $this->viewBase."/noAccess.html";
36
	}
37
	
38
	/**
39
	 * Returns the base template for all Auth actions if getBaseTemplate return a base template filename
40
	 * @return string
41
	 */
42
	public function getViewBaseTemplate() {
43
		return $this->viewBase."/baseTemplate.html";
44
	}
45
	
46
	/**
47
	 * To override
48
	 * @return string
49
	 */
50
	public function getViewDisconnected() {
51
		return $this->viewBase."/disconnected.html";
52
	}
53
	
54
	/**
55
	 * 
56
	 * @return string
57
	 */
58
	public function getViewMessage() {
59
		return $this->viewBase."/message.html";
60
	}
61
	
62
	/**
63
	 * To override
64
	 * Returns the base template filename, default : null
65
	 */
66 1
	public function getBaseTemplate(){
67 1
		return;
68
	}
69
}
70
71