Passed
Push — master ( 0ed261...e52b37 )
by Jean-Christophe
17:09
created

AuthFiles::getBaseTemplate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 2
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
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
	 *
16
	 * @return string
17
	 */
18
	public function getViewIndex() {
19
		return $this->viewBase . "/index.html";
20
	}
21
22
	/**
23
	 * To override
24
	 * The info view, displays the connected user and a logout button.
25
	 *
26
	 * @return string
27
	 */
28
	public function getViewInfo() {
29
		return $this->viewBase . "/info.html";
30
	}
31
32
	/**
33
	 * To override
34
	 * Displays the form for a new account.
35
	 *
36
	 * @return string
37
	 */
38
	public function getViewCreate() {
39
		return $this->viewBase . "/create.html";
40
	}
41
	
42
	/**
43
	 * To override
44
	 * Displays the form for step two.
45
	 *
46
	 * @return string
47
	 */
48
	public function getViewStepTwo() {
49
		return $this->viewBase . "/stepTwo.html";
50
	}
51
	
52
	/**
53
	 * To override
54
	 * Displays the message if the 2FA code is bad.
55
	 *
56
	 * @return string
57
	 */
58
	public function getViewBadTwoFACode() {
59
		return $this->viewBase . "/badTwoFACode.html";
60
	}
61
	
62
	/**
63
	 * To override
64
	 *
65
	 * @return string
66
	 */
67
	public function getViewNoAccess() {
68
		return $this->viewBase . "/noAccess.html";
69
	}
70
71
	/**
72
	 * Returns the base template for all Auth actions if getBaseTemplate return a base template filename.
73
	 *
74
	 * @return string
75
	 */
76
	public function getViewBaseTemplate() {
77
		return $this->viewBase . "/baseTemplate.html";
78
	}
79
80
	/**
81
	 * To override
82
	 *
83
	 * @return string
84
	 */
85
	public function getViewDisconnected() {
86
		return $this->viewBase . "/disconnected.html";
87
	}
88
89
	/**
90
	 *
91
	 * @return string
92
	 */
93
	public function getViewMessage() {
94
		return $this->viewBase . "/message.html";
95
	}
96
97
	/**
98
	 * To override
99
	 * Returns the base template filename, default : null
100
	 */
101 1
	public function getBaseTemplate() {
102 1
		return;
103
	}
104
}
105
106