@@ -10,19 +10,19 @@ |
||
10 | 10 | */ |
11 | 11 | namespace JaegerApp; |
12 | 12 | |
13 | +use JaegerApp\Console; |
|
14 | +use JaegerApp\Db; |
|
13 | 15 | use JaegerApp\Di; |
16 | +use JaegerApp\Email; |
|
14 | 17 | use JaegerApp\Encrypt; |
15 | -use JaegerApp\Db; |
|
16 | -use JaegerApp\Language; |
|
17 | -use JaegerApp\Validate; |
|
18 | -use JaegerApp\Files; |
|
19 | 18 | use JaegerApp\Errors; |
19 | +use JaegerApp\Files; |
|
20 | +use JaegerApp\Language; |
|
20 | 21 | use JaegerApp\License; |
21 | -use JaegerApp\Email; |
|
22 | -use JaegerApp\View; |
|
23 | 22 | use JaegerApp\Regex; |
24 | 23 | use JaegerApp\Shell; |
25 | -use JaegerApp\Console; |
|
24 | +use JaegerApp\Validate; |
|
25 | +use JaegerApp\View; |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * Jaeger - Bootstrap Object |
@@ -117,11 +117,11 @@ discard block |
||
117 | 117 | public function getServices() |
118 | 118 | { |
119 | 119 | $this->container = parent::getServices(); |
120 | - $this->container['db'] = function ($c) { |
|
120 | + $this->container['db'] = function($c) { |
|
121 | 121 | $db = new Db(); |
122 | 122 | $db->setCredentials($this->getDbConfig()); |
123 | 123 | $type = 'pdo'; |
124 | - if( function_exists('mysqli_select_db')) |
|
124 | + if (function_exists('mysqli_select_db')) |
|
125 | 125 | { |
126 | 126 | $type = 'mysqli'; |
127 | 127 | } |
@@ -130,14 +130,14 @@ discard block |
||
130 | 130 | return $db; |
131 | 131 | }; |
132 | 132 | |
133 | - $this->container['encrypt'] = function ($c) { |
|
133 | + $this->container['encrypt'] = function($c) { |
|
134 | 134 | $encrypt = new Encrypt(); |
135 | 135 | $new_key = $c['platform']->getEncryptionKey(); |
136 | 136 | $encrypt->setKey($new_key); |
137 | 137 | return $encrypt; |
138 | 138 | }; |
139 | 139 | |
140 | - $this->container['lang'] = function ($c) { |
|
140 | + $this->container['lang'] = function($c) { |
|
141 | 141 | $lang = new Language(); |
142 | 142 | if (is_array($this->getLangPath())) { |
143 | 143 | foreach ($this->getLangPath() as $path) { |
@@ -149,29 +149,29 @@ discard block |
||
149 | 149 | return $lang; |
150 | 150 | }; |
151 | 151 | |
152 | - $this->container['validate'] = function ($c) { |
|
152 | + $this->container['validate'] = function($c) { |
|
153 | 153 | $validate = new Validate(); |
154 | 154 | $validate->setRegex($this->container['regex']); |
155 | 155 | return $validate; |
156 | 156 | }; |
157 | 157 | |
158 | - $this->container['files'] = function ($c) { |
|
158 | + $this->container['files'] = function($c) { |
|
159 | 159 | $file = new Files(); |
160 | 160 | return $file; |
161 | 161 | }; |
162 | 162 | |
163 | - $this->container['errors'] = function ($c) { |
|
163 | + $this->container['errors'] = function($c) { |
|
164 | 164 | $errors = new Errors(); |
165 | 165 | $errors->setValidation($c['validate']); |
166 | 166 | return $errors; |
167 | 167 | }; |
168 | 168 | |
169 | - $this->container['license'] = function ($c) { |
|
169 | + $this->container['license'] = function($c) { |
|
170 | 170 | $license = new License(); |
171 | 171 | return $license; |
172 | 172 | }; |
173 | 173 | |
174 | - $this->container['email'] = function ($c) { |
|
174 | + $this->container['email'] = function($c) { |
|
175 | 175 | |
176 | 176 | $email = new Email(); |
177 | 177 | $email->setView($c['view']); |
@@ -179,25 +179,25 @@ discard block |
||
179 | 179 | return $email; |
180 | 180 | }; |
181 | 181 | |
182 | - $this->container['view'] = function ($c) { |
|
182 | + $this->container['view'] = function($c) { |
|
183 | 183 | $view = new View(); |
184 | 184 | $helpers = array( |
185 | - 'file_size' => function ($text) { |
|
185 | + 'file_size' => function($text) { |
|
186 | 186 | return $this->container['view_helpers']->m62FileSize($text, false); |
187 | 187 | }, |
188 | - 'lang' => function ($text) { |
|
188 | + 'lang' => function($text) { |
|
189 | 189 | return $this->container['view_helpers']->m62Lang($text); |
190 | 190 | }, |
191 | - 'date_time' => function ($text, $html = true) { |
|
191 | + 'date_time' => function($text, $html = true) { |
|
192 | 192 | return $this->container['view_helpers']->m62DateTime($text, false); |
193 | 193 | }, |
194 | - 'relative_time' => function ($date) { |
|
194 | + 'relative_time' => function($date) { |
|
195 | 195 | return $this->container['view_helpers']->m62RelativeDateTime($date); |
196 | 196 | }, |
197 | - 'encode' => function ($text) { |
|
197 | + 'encode' => function($text) { |
|
198 | 198 | return $this->container['view_helpers']->m62Encode($text); |
199 | 199 | }, |
200 | - 'decode' => function ($text) { |
|
200 | + 'decode' => function($text) { |
|
201 | 201 | return $this->container['view_helpers']->m62Decode($text); |
202 | 202 | } |
203 | 203 | ); |
@@ -206,17 +206,17 @@ discard block |
||
206 | 206 | return $view; |
207 | 207 | }; |
208 | 208 | |
209 | - $this->container['regex'] = function ($c) { |
|
209 | + $this->container['regex'] = function($c) { |
|
210 | 210 | $regex = new Regex(); |
211 | 211 | return $regex; |
212 | 212 | }; |
213 | 213 | |
214 | - $this->container['shell'] = function ($c) { |
|
214 | + $this->container['shell'] = function($c) { |
|
215 | 215 | $shell = new Shell(); |
216 | 216 | return $shell; |
217 | 217 | }; |
218 | 218 | |
219 | - $this->container['console'] = function ($c) { |
|
219 | + $this->container['console'] = function($c) { |
|
220 | 220 | $console = new Console(); |
221 | 221 | $console->setLang($c['lang']); |
222 | 222 | return $console; |