@@ -12,10 +12,10 @@ |
||
12 | 12 | require_once("vendor/autoload.php"); |
13 | 13 | |
14 | 14 | try { |
15 | - $mvc = new Drone\Mvc\Application(include "config/application.config.php"); |
|
16 | - $mvc->run(); |
|
15 | + $mvc = new Drone\Mvc\Application(include "config/application.config.php"); |
|
16 | + $mvc->run(); |
|
17 | 17 | } |
18 | 18 | catch (Drone\Mvc\PageNotFoundException $e) |
19 | 19 | { |
20 | - die('Error 404 (Page Not Found)!!'); |
|
20 | + die('Error 404 (Page Not Found)!!'); |
|
21 | 21 | } |
22 | 22 | \ No newline at end of file |
@@ -6,52 +6,52 @@ |
||
6 | 6 | |
7 | 7 | class User extends Entity |
8 | 8 | { |
9 | - /** |
|
10 | - * @var integer |
|
11 | - */ |
|
9 | + /** |
|
10 | + * @var integer |
|
11 | + */ |
|
12 | 12 | public $USER_ID; |
13 | 13 | |
14 | - /** |
|
15 | - * @var string |
|
16 | - */ |
|
14 | + /** |
|
15 | + * @var string |
|
16 | + */ |
|
17 | 17 | public $USERNAME; |
18 | 18 | |
19 | - /** |
|
20 | - * @var integer |
|
21 | - */ |
|
19 | + /** |
|
20 | + * @var integer |
|
21 | + */ |
|
22 | 22 | public $USER_STATE_ID; |
23 | 23 | |
24 | - /** |
|
25 | - * @var integer |
|
26 | - */ |
|
24 | + /** |
|
25 | + * @var integer |
|
26 | + */ |
|
27 | 27 | public $ROLE_ID; |
28 | 28 | |
29 | - /** |
|
30 | - * @var string |
|
31 | - */ |
|
29 | + /** |
|
30 | + * @var string |
|
31 | + */ |
|
32 | 32 | public $USER_PASSWORD; |
33 | 33 | |
34 | - /** |
|
35 | - * @var string |
|
36 | - */ |
|
34 | + /** |
|
35 | + * @var string |
|
36 | + */ |
|
37 | 37 | public $EMAIL; |
38 | 38 | |
39 | - /** |
|
40 | - * @var string |
|
41 | - */ |
|
39 | + /** |
|
40 | + * @var string |
|
41 | + */ |
|
42 | 42 | public $TOKEN; |
43 | 43 | |
44 | - /** |
|
45 | - * @var date |
|
46 | - */ |
|
44 | + /** |
|
45 | + * @var date |
|
46 | + */ |
|
47 | 47 | public $RECORD_DATE; |
48 | 48 | |
49 | 49 | public function __construct($data = []) |
50 | 50 | { |
51 | - parent::__construct($data); |
|
51 | + parent::__construct($data); |
|
52 | 52 | |
53 | - $config = include 'module/Auth/config/user.config.php'; |
|
54 | - $table = $config["authentication"]["gateway"]["entity"]; |
|
53 | + $config = include 'module/Auth/config/user.config.php'; |
|
54 | + $table = $config["authentication"]["gateway"]["entity"]; |
|
55 | 55 | |
56 | 56 | $this->setTableName($table); |
57 | 57 | } |
@@ -9,12 +9,12 @@ discard block |
||
9 | 9 | |
10 | 10 | class Module extends AbstractionModule |
11 | 11 | { |
12 | - public function init(AbstractionController $c) |
|
13 | - { |
|
14 | - $config = $this->getUserConfig(); |
|
15 | - $_config = $this->toFormConfig($config); |
|
12 | + public function init(AbstractionController $c) |
|
13 | + { |
|
14 | + $config = $this->getUserConfig(); |
|
15 | + $_config = $this->toFormConfig($config); |
|
16 | 16 | |
17 | - # config constraints |
|
17 | + # config constraints |
|
18 | 18 | |
19 | 19 | $components = [ |
20 | 20 | "attributes" => [ |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | } |
81 | 81 | |
82 | 82 | $this->setTranslator($c); |
83 | - } |
|
83 | + } |
|
84 | 84 | |
85 | 85 | private function setTranslator(AbstractionController $c) |
86 | 86 | { |
@@ -102,30 +102,30 @@ discard block |
||
102 | 102 | $c->translator = new \Zend\Mvc\I18n\Translator($i18nTranslator); |
103 | 103 | } |
104 | 104 | |
105 | - public function getUserConfig() |
|
106 | - { |
|
107 | - return include __DIR__ . "/config/user.config.php"; |
|
108 | - } |
|
109 | - |
|
110 | - private function toFormConfig($config) |
|
111 | - { |
|
112 | - $new_config = []; |
|
113 | - $again = false; |
|
114 | - |
|
115 | - foreach ($config as $param => $configure) |
|
116 | - { |
|
117 | - if (is_array($configure)) |
|
118 | - { |
|
119 | - foreach ($configure as $key => $value) |
|
120 | - { |
|
121 | - $again = true; |
|
122 | - $new_config[$param . "_" . $key] = $value; |
|
123 | - } |
|
124 | - } |
|
125 | - else |
|
126 | - $new_config[$param] = $configure; |
|
127 | - } |
|
128 | - |
|
129 | - return (!$again) ? $new_config : $this->toFormConfig($new_config); |
|
130 | - } |
|
105 | + public function getUserConfig() |
|
106 | + { |
|
107 | + return include __DIR__ . "/config/user.config.php"; |
|
108 | + } |
|
109 | + |
|
110 | + private function toFormConfig($config) |
|
111 | + { |
|
112 | + $new_config = []; |
|
113 | + $again = false; |
|
114 | + |
|
115 | + foreach ($config as $param => $configure) |
|
116 | + { |
|
117 | + if (is_array($configure)) |
|
118 | + { |
|
119 | + foreach ($configure as $key => $value) |
|
120 | + { |
|
121 | + $again = true; |
|
122 | + $new_config[$param . "_" . $key] = $value; |
|
123 | + } |
|
124 | + } |
|
125 | + else |
|
126 | + $new_config[$param] = $configure; |
|
127 | + } |
|
128 | + |
|
129 | + return (!$again) ? $new_config : $this->toFormConfig($new_config); |
|
130 | + } |
|
131 | 131 | } |
132 | 132 | \ No newline at end of file |
@@ -3,12 +3,12 @@ |
||
3 | 3 | return [ |
4 | 4 | "Register form" => "Register form", |
5 | 5 | "User registering" => "User registering", |
6 | - "Username" => "Username", |
|
7 | - "username" => "username", |
|
8 | - "Email" => "Email", |
|
9 | - "email" => "email", |
|
10 | - "Password" => "Password", |
|
11 | - "password" => "password", |
|
6 | + "Username" => "Username", |
|
7 | + "username" => "username", |
|
8 | + "Email" => "Email", |
|
9 | + "email" => "email", |
|
10 | + "Password" => "Password", |
|
11 | + "password" => "password", |
|
12 | 12 | "Repeat your password" => "Repeat your password", |
13 | 13 | "Register now" => "Register now", |
14 | 14 | "Log in" => "Log in", |
@@ -1,25 +1,25 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | return [ |
4 | - 'project' => [ |
|
5 | - 'name' => 'SQLWebManager', |
|
6 | - ], |
|
7 | - 'mail' => [ |
|
8 | - 'checking' => [ |
|
9 | - 'enabled' => false, |
|
10 | - 'from' => '[email protected]' |
|
11 | - ], |
|
12 | - ], |
|
13 | - "authentication" => [ |
|
14 | - "method" => "_COOKIE", |
|
15 | - "key" => "session_id", |
|
16 | - "gateway" => [ |
|
17 | - "entity" => "SWM_USERS", |
|
18 | - "credentials" => [ |
|
19 | - "username" => "USERNAME", |
|
20 | - "password" => "USER_PASSWORD" |
|
21 | - ] |
|
22 | - ] |
|
23 | - ], |
|
24 | - "redirect" => "Workarea" |
|
4 | + 'project' => [ |
|
5 | + 'name' => 'SQLWebManager', |
|
6 | + ], |
|
7 | + 'mail' => [ |
|
8 | + 'checking' => [ |
|
9 | + 'enabled' => false, |
|
10 | + 'from' => '[email protected]' |
|
11 | + ], |
|
12 | + ], |
|
13 | + "authentication" => [ |
|
14 | + "method" => "_COOKIE", |
|
15 | + "key" => "session_id", |
|
16 | + "gateway" => [ |
|
17 | + "entity" => "SWM_USERS", |
|
18 | + "credentials" => [ |
|
19 | + "username" => "USERNAME", |
|
20 | + "password" => "USER_PASSWORD" |
|
21 | + ] |
|
22 | + ] |
|
23 | + ], |
|
24 | + "redirect" => "Workarea" |
|
25 | 25 | ]; |
26 | 26 | \ No newline at end of file |
@@ -3,11 +3,11 @@ |
||
3 | 3 | return [ |
4 | 4 | 'router' => [ |
5 | 5 | 'routes' => [ |
6 | - 'Auth' => [ |
|
7 | - 'module' => 'Auth', |
|
8 | - 'controller' => 'LogIn', |
|
9 | - 'view' => 'index' |
|
10 | - ] |
|
6 | + 'Auth' => [ |
|
7 | + 'module' => 'Auth', |
|
8 | + 'controller' => 'LogIn', |
|
9 | + 'view' => 'index' |
|
10 | + ] |
|
11 | 11 | ], |
12 | 12 | ], |
13 | 13 | 'view_manager' => [ |
@@ -6,5 +6,5 @@ |
||
6 | 6 | |
7 | 7 | class Entity extends DbEntity |
8 | 8 | { |
9 | - // general table gateway |
|
9 | + // general table gateway |
|
10 | 10 | } |
11 | 11 | \ No newline at end of file |
@@ -7,8 +7,8 @@ |
||
7 | 7 | |
8 | 8 | class Module extends AbstractionModule |
9 | 9 | { |
10 | - public function init(AbstractionController $c) |
|
11 | - { |
|
12 | - // init procedures |
|
13 | - } |
|
10 | + public function init(AbstractionController $c) |
|
11 | + { |
|
12 | + // init procedures |
|
13 | + } |
|
14 | 14 | } |
15 | 15 | \ No newline at end of file |
@@ -3,11 +3,11 @@ |
||
3 | 3 | return [ |
4 | 4 | 'router' => [ |
5 | 5 | 'routes' => [ |
6 | - 'Utils' => [ |
|
7 | - 'module' => 'Utils', |
|
8 | - 'controller' => '', |
|
9 | - 'view' => '' |
|
10 | - ] |
|
6 | + 'Utils' => [ |
|
7 | + 'module' => 'Utils', |
|
8 | + 'controller' => '', |
|
9 | + 'view' => '' |
|
10 | + ] |
|
11 | 11 | ], |
12 | 12 | ], |
13 | 13 | 'view_manager' => [ |