@@ -6,19 +6,19 @@ discard block |
||
6 | 6 | |
7 | 7 | class User extends Entity |
8 | 8 | { |
9 | - /** |
|
10 | - * @var string |
|
11 | - */ |
|
9 | + /** |
|
10 | + * @var string |
|
11 | + */ |
|
12 | 12 | public $TOKEN; |
13 | 13 | |
14 | - /** |
|
15 | - * @var date |
|
16 | - */ |
|
14 | + /** |
|
15 | + * @var date |
|
16 | + */ |
|
17 | 17 | public $RECORD_DATE; |
18 | 18 | |
19 | 19 | public function __construct($data = []) |
20 | 20 | { |
21 | - $config = include 'module/Auth/config/user.config.php'; |
|
21 | + $config = include 'module/Auth/config/user.config.php'; |
|
22 | 22 | |
23 | 23 | $username_str = $config["authentication"]["gateway"]["credentials"]["username"]; |
24 | 24 | $password_str = $config["authentication"]["gateway"]["credentials"]["password"]; |
@@ -31,10 +31,10 @@ discard block |
||
31 | 31 | $this->{$field} = null; |
32 | 32 | } |
33 | 33 | |
34 | - parent::__construct($data); |
|
34 | + parent::__construct($data); |
|
35 | 35 | |
36 | - $table = $config["authentication"]["gateway"]["entity"]; |
|
37 | - $prefix = $config["database"]["prefix"]; |
|
36 | + $table = $config["authentication"]["gateway"]["entity"]; |
|
37 | + $prefix = $config["database"]["prefix"]; |
|
38 | 38 | |
39 | 39 | $this->setTableName($prefix . "_" . $table); |
40 | 40 | } |
@@ -6,32 +6,32 @@ |
||
6 | 6 | |
7 | 7 | class Role extends Entity |
8 | 8 | { |
9 | - /** |
|
10 | - * @var integer |
|
11 | - */ |
|
9 | + /** |
|
10 | + * @var integer |
|
11 | + */ |
|
12 | 12 | public $ROLE_ID; |
13 | 13 | |
14 | - /** |
|
15 | - * @var string |
|
16 | - */ |
|
14 | + /** |
|
15 | + * @var string |
|
16 | + */ |
|
17 | 17 | public $ROLE_NAME; |
18 | 18 | |
19 | - /** |
|
20 | - * @var string |
|
21 | - */ |
|
19 | + /** |
|
20 | + * @var string |
|
21 | + */ |
|
22 | 22 | public $STATE; |
23 | 23 | |
24 | - /** |
|
25 | - * @var date |
|
26 | - */ |
|
24 | + /** |
|
25 | + * @var date |
|
26 | + */ |
|
27 | 27 | public $RECORD_DATE; |
28 | 28 | |
29 | 29 | public function __construct($data = []) |
30 | 30 | { |
31 | - parent::__construct($data); |
|
31 | + parent::__construct($data); |
|
32 | 32 | |
33 | - $config = include 'module/Auth/config/user.config.php'; |
|
34 | - $prefix = $config["database"]["prefix"]; |
|
33 | + $config = include 'module/Auth/config/user.config.php'; |
|
34 | + $prefix = $config["database"]["prefix"]; |
|
35 | 35 | |
36 | 36 | $this->setTableName($prefix . "_" . "ROLE"); |
37 | 37 | } |
@@ -6,9 +6,9 @@ |
||
6 | 6 | |
7 | 7 | class DbUserRole extends Entity |
8 | 8 | { |
9 | - /** |
|
10 | - * @var string |
|
11 | - */ |
|
9 | + /** |
|
10 | + * @var string |
|
11 | + */ |
|
12 | 12 | public $USERNAME; |
13 | 13 | |
14 | 14 | /** |
@@ -202,8 +202,8 @@ |
||
202 | 202 | $c->translator = new \Zend\Mvc\I18n\Translator($i18nTranslator); |
203 | 203 | } |
204 | 204 | |
205 | - public function getUserConfig() |
|
206 | - { |
|
207 | - return include __DIR__ . "/config/user.config.php"; |
|
208 | - } |
|
205 | + public function getUserConfig() |
|
206 | + { |
|
207 | + return include __DIR__ . "/config/user.config.php"; |
|
208 | + } |
|
209 | 209 | } |
210 | 210 | \ No newline at end of file |
@@ -2,41 +2,41 @@ |
||
2 | 2 | |
3 | 3 | if (!function_exists('ifdef')) |
4 | 4 | { |
5 | - function ifdef($value, Array $array) |
|
6 | - { |
|
7 | - $global = __DIR__ . '/../../../config/global.config.php'; |
|
5 | + function ifdef($value, Array $array) |
|
6 | + { |
|
7 | + $global = __DIR__ . '/../../../config/global.config.php'; |
|
8 | 8 | |
9 | - if (file_exists($global)) |
|
10 | - { |
|
11 | - $key = array_shift($array); |
|
12 | - $in = include $global; |
|
9 | + if (file_exists($global)) |
|
10 | + { |
|
11 | + $key = array_shift($array); |
|
12 | + $in = include $global; |
|
13 | 13 | |
14 | - do |
|
15 | - { |
|
16 | - if (is_array($in)) |
|
17 | - { |
|
18 | - if (array_key_exists($key, $in)) |
|
19 | - $in = $in[$key]; |
|
20 | - else |
|
21 | - return $value; |
|
22 | - } |
|
23 | - else |
|
24 | - return $value; |
|
14 | + do |
|
15 | + { |
|
16 | + if (is_array($in)) |
|
17 | + { |
|
18 | + if (array_key_exists($key, $in)) |
|
19 | + $in = $in[$key]; |
|
20 | + else |
|
21 | + return $value; |
|
22 | + } |
|
23 | + else |
|
24 | + return $value; |
|
25 | 25 | |
26 | - $key = ($array) ? array_shift($array) : NULL; |
|
26 | + $key = ($array) ? array_shift($array) : NULL; |
|
27 | 27 | |
28 | - if (!$key) |
|
29 | - return $in; |
|
28 | + if (!$key) |
|
29 | + return $in; |
|
30 | 30 | |
31 | - } while($key); |
|
32 | - } |
|
33 | - else |
|
34 | - return $value; |
|
35 | - } |
|
31 | + } while($key); |
|
32 | + } |
|
33 | + else |
|
34 | + return $value; |
|
35 | + } |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | return [ |
39 | - 'project' => [ |
|
40 | - 'name' => ifdef('PROTOTYPE4', ["project", "name"]), # The name of your project |
|
41 | - ], |
|
39 | + 'project' => [ |
|
40 | + 'name' => ifdef('PROTOTYPE4', ["project", "name"]), # The name of your project |
|
41 | + ], |
|
42 | 42 | ]; |
43 | 43 | \ No newline at end of file |
@@ -7,25 +7,25 @@ |
||
7 | 7 | |
8 | 8 | class Error extends AbstractionController |
9 | 9 | { |
10 | - public function notFound() |
|
11 | - { |
|
12 | - $this->setShowView(false); |
|
13 | - $this->setLayout('HTTP404'); |
|
10 | + public function notFound() |
|
11 | + { |
|
12 | + $this->setShowView(false); |
|
13 | + $this->setLayout('HTTP404'); |
|
14 | 14 | |
15 | 15 | $http = new Http(); |
16 | 16 | $http->writeStatus($http::HTTP_NOT_FOUND); |
17 | 17 | |
18 | - return []; |
|
19 | - } |
|
18 | + return []; |
|
19 | + } |
|
20 | 20 | |
21 | - public function notFoundView() |
|
22 | - { |
|
23 | - $this->setLayout('blank'); |
|
24 | - //$this->setTerminal(true); |
|
21 | + public function notFoundView() |
|
22 | + { |
|
23 | + $this->setLayout('blank'); |
|
24 | + //$this->setTerminal(true); |
|
25 | 25 | |
26 | 26 | $http = new Http(); |
27 | 27 | $http->writeStatus($http::HTTP_NOT_FOUND); |
28 | 28 | |
29 | - return []; |
|
30 | - } |
|
29 | + return []; |
|
30 | + } |
|
31 | 31 | } |
32 | 32 | \ No newline at end of file |
@@ -2,21 +2,21 @@ |
||
2 | 2 | |
3 | 3 | return [ |
4 | 4 | 'project' => [ |
5 | - 'id' => 'id6447896', # Unique ID for the project |
|
6 | - 'name' => 'SQLWebManager' # The name of your project |
|
5 | + 'id' => 'id6447896', # Unique ID for the project |
|
6 | + 'name' => 'SQLWebManager' # The name of your project |
|
7 | 7 | ], |
8 | - 'mail' => [ |
|
9 | - "noreply" => "", |
|
10 | - "host" => "" |
|
11 | - ], |
|
12 | - "authentication" => [ |
|
13 | - "method" => "_COOKIE", # the method to store credentials (_COOKIE, _SESSION) |
|
14 | - "key" => "session_id6448654", # the key in the array to store credentials |
|
15 | - ], |
|
16 | - "database" => [ |
|
17 | - /** TABLE PREFIX: |
|
18 | - * Database prefix of tables, specifically here, the prefix of entity gateway above. |
|
19 | - */ |
|
20 | - "prefix" => "SWM" |
|
21 | - ] |
|
8 | + 'mail' => [ |
|
9 | + "noreply" => "", |
|
10 | + "host" => "" |
|
11 | + ], |
|
12 | + "authentication" => [ |
|
13 | + "method" => "_COOKIE", # the method to store credentials (_COOKIE, _SESSION) |
|
14 | + "key" => "session_id6448654", # the key in the array to store credentials |
|
15 | + ], |
|
16 | + "database" => [ |
|
17 | + /** TABLE PREFIX: |
|
18 | + * Database prefix of tables, specifically here, the prefix of entity gateway above. |
|
19 | + */ |
|
20 | + "prefix" => "SWM" |
|
21 | + ] |
|
22 | 22 | ]; |
23 | 23 | \ No newline at end of file |
@@ -13,9 +13,9 @@ |
||
13 | 13 | |
14 | 14 | try |
15 | 15 | { |
16 | - $config = include "config/application.config.php"; |
|
17 | - $mvc = new Drone\Mvc\Application($config); |
|
18 | - $mvc->run(); |
|
16 | + $config = include "config/application.config.php"; |
|
17 | + $mvc = new Drone\Mvc\Application($config); |
|
18 | + $mvc->run(); |
|
19 | 19 | } |
20 | 20 | # to load only the error view |
21 | 21 | catch (Drone\Mvc\Exception\ViewNotFoundException $e) |
@@ -2,52 +2,52 @@ |
||
2 | 2 | |
3 | 3 | if (!function_exists('ifdef')) |
4 | 4 | { |
5 | - function ifdef($value, Array $array) |
|
6 | - { |
|
7 | - $global = __DIR__ . '/../../../config/global.config.php'; |
|
5 | + function ifdef($value, Array $array) |
|
6 | + { |
|
7 | + $global = __DIR__ . '/../../../config/global.config.php'; |
|
8 | 8 | |
9 | - if (file_exists($global)) |
|
10 | - { |
|
11 | - $key = array_shift($array); |
|
12 | - $in = include $global; |
|
9 | + if (file_exists($global)) |
|
10 | + { |
|
11 | + $key = array_shift($array); |
|
12 | + $in = include $global; |
|
13 | 13 | |
14 | - do |
|
15 | - { |
|
16 | - if (is_array($in)) |
|
17 | - { |
|
18 | - if (array_key_exists($key, $in)) |
|
19 | - $in = $in[$key]; |
|
20 | - else |
|
21 | - return $value; |
|
22 | - } |
|
23 | - else |
|
24 | - return $value; |
|
14 | + do |
|
15 | + { |
|
16 | + if (is_array($in)) |
|
17 | + { |
|
18 | + if (array_key_exists($key, $in)) |
|
19 | + $in = $in[$key]; |
|
20 | + else |
|
21 | + return $value; |
|
22 | + } |
|
23 | + else |
|
24 | + return $value; |
|
25 | 25 | |
26 | - $key = ($array) ? array_shift($array) : NULL; |
|
26 | + $key = ($array) ? array_shift($array) : NULL; |
|
27 | 27 | |
28 | - if (!$key) |
|
29 | - return $in; |
|
28 | + if (!$key) |
|
29 | + return $in; |
|
30 | 30 | |
31 | - } while($key); |
|
32 | - } |
|
33 | - else |
|
34 | - return $value; |
|
35 | - } |
|
31 | + } while($key); |
|
32 | + } |
|
33 | + else |
|
34 | + return $value; |
|
35 | + } |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | return [ |
39 | - 'project' => [ |
|
40 | - 'name' => ifdef('PROJECT NAME', ["project", "name"]), # The name of your project |
|
41 | - ], |
|
42 | - "authentication" => [ |
|
43 | - "method" => ifdef('_COOKIE', ["authentication", "method"]), # the method to store credentials (_COOKIE, _SESSION) |
|
44 | - "key" => ifdef('session_id', ["authentication", "key"]), # the key in the array to store credentials |
|
45 | - ], |
|
46 | - "database" => [ |
|
47 | - /** TABLE PREFIX: |
|
48 | - * Database prefix of tables, specifically here, the prefix of entity gateway above. |
|
49 | - */ |
|
50 | - "prefix" => ifdef('APP', ["database", "prefix"]) |
|
51 | - ], |
|
52 | - "redirect" => "Auth" # where users will be redirect to if the they aren't logged in |
|
39 | + 'project' => [ |
|
40 | + 'name' => ifdef('PROJECT NAME', ["project", "name"]), # The name of your project |
|
41 | + ], |
|
42 | + "authentication" => [ |
|
43 | + "method" => ifdef('_COOKIE', ["authentication", "method"]), # the method to store credentials (_COOKIE, _SESSION) |
|
44 | + "key" => ifdef('session_id', ["authentication", "key"]), # the key in the array to store credentials |
|
45 | + ], |
|
46 | + "database" => [ |
|
47 | + /** TABLE PREFIX: |
|
48 | + * Database prefix of tables, specifically here, the prefix of entity gateway above. |
|
49 | + */ |
|
50 | + "prefix" => ifdef('APP', ["database", "prefix"]) |
|
51 | + ], |
|
52 | + "redirect" => "Auth" # where users will be redirect to if the they aren't logged in |
|
53 | 53 | ]; |
54 | 54 | \ No newline at end of file |