@@ -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 = 'mysqli'; |
| 124 | - if(class_exists('Pdo')) { |
|
| 124 | + if (class_exists('Pdo')) { |
|
| 125 | 125 | $type = 'pdo'; |
| 126 | 126 | } |
| 127 | 127 | |
@@ -129,14 +129,14 @@ discard block |
||
| 129 | 129 | return $db; |
| 130 | 130 | }; |
| 131 | 131 | |
| 132 | - $this->container['encrypt'] = function ($c) { |
|
| 132 | + $this->container['encrypt'] = function($c) { |
|
| 133 | 133 | $encrypt = new Encrypt(); |
| 134 | 134 | $new_key = $c['platform']->getEncryptionKey(); |
| 135 | 135 | $encrypt->setKey($new_key); |
| 136 | 136 | return $encrypt; |
| 137 | 137 | }; |
| 138 | 138 | |
| 139 | - $this->container['lang'] = function ($c) { |
|
| 139 | + $this->container['lang'] = function($c) { |
|
| 140 | 140 | $lang = new Language(); |
| 141 | 141 | if (is_array($this->getLangPath())) { |
| 142 | 142 | foreach ($this->getLangPath() as $path) { |
@@ -148,29 +148,29 @@ discard block |
||
| 148 | 148 | return $lang; |
| 149 | 149 | }; |
| 150 | 150 | |
| 151 | - $this->container['validate'] = function ($c) { |
|
| 151 | + $this->container['validate'] = function($c) { |
|
| 152 | 152 | $validate = new Validate(); |
| 153 | 153 | $validate->setRegex($this->container['regex']); |
| 154 | 154 | return $validate; |
| 155 | 155 | }; |
| 156 | 156 | |
| 157 | - $this->container['files'] = function ($c) { |
|
| 157 | + $this->container['files'] = function($c) { |
|
| 158 | 158 | $file = new Files(); |
| 159 | 159 | return $file; |
| 160 | 160 | }; |
| 161 | 161 | |
| 162 | - $this->container['errors'] = function ($c) { |
|
| 162 | + $this->container['errors'] = function($c) { |
|
| 163 | 163 | $errors = new Errors(); |
| 164 | 164 | $errors->setValidation($c['validate']); |
| 165 | 165 | return $errors; |
| 166 | 166 | }; |
| 167 | 167 | |
| 168 | - $this->container['license'] = function ($c) { |
|
| 168 | + $this->container['license'] = function($c) { |
|
| 169 | 169 | $license = new License(); |
| 170 | 170 | return $license; |
| 171 | 171 | }; |
| 172 | 172 | |
| 173 | - $this->container['email'] = function ($c) { |
|
| 173 | + $this->container['email'] = function($c) { |
|
| 174 | 174 | |
| 175 | 175 | $email = new Email(); |
| 176 | 176 | $email->setView($c['view']); |
@@ -178,25 +178,25 @@ discard block |
||
| 178 | 178 | return $email; |
| 179 | 179 | }; |
| 180 | 180 | |
| 181 | - $this->container['view'] = function ($c) { |
|
| 181 | + $this->container['view'] = function($c) { |
|
| 182 | 182 | $view = new View(); |
| 183 | 183 | $helpers = array( |
| 184 | - 'file_size' => function ($text) { |
|
| 184 | + 'file_size' => function($text) { |
|
| 185 | 185 | return $this->container['view_helpers']->m62FileSize($text, false); |
| 186 | 186 | }, |
| 187 | - 'lang' => function ($text) { |
|
| 187 | + 'lang' => function($text) { |
|
| 188 | 188 | return $this->container['view_helpers']->m62Lang($text); |
| 189 | 189 | }, |
| 190 | - 'date_time' => function ($text, $html = true) { |
|
| 190 | + 'date_time' => function($text, $html = true) { |
|
| 191 | 191 | return $this->container['view_helpers']->m62DateTime($text, false); |
| 192 | 192 | }, |
| 193 | - 'relative_time' => function ($date) { |
|
| 193 | + 'relative_time' => function($date) { |
|
| 194 | 194 | return $this->container['view_helpers']->m62RelativeDateTime($date); |
| 195 | 195 | }, |
| 196 | - 'encode' => function ($text) { |
|
| 196 | + 'encode' => function($text) { |
|
| 197 | 197 | return $this->container['view_helpers']->m62Encode($text); |
| 198 | 198 | }, |
| 199 | - 'decode' => function ($text) { |
|
| 199 | + 'decode' => function($text) { |
|
| 200 | 200 | return $this->container['view_helpers']->m62Decode($text); |
| 201 | 201 | } |
| 202 | 202 | ); |
@@ -205,17 +205,17 @@ discard block |
||
| 205 | 205 | return $view; |
| 206 | 206 | }; |
| 207 | 207 | |
| 208 | - $this->container['regex'] = function ($c) { |
|
| 208 | + $this->container['regex'] = function($c) { |
|
| 209 | 209 | $regex = new Regex(); |
| 210 | 210 | return $regex; |
| 211 | 211 | }; |
| 212 | 212 | |
| 213 | - $this->container['shell'] = function ($c) { |
|
| 213 | + $this->container['shell'] = function($c) { |
|
| 214 | 214 | $shell = new Shell(); |
| 215 | 215 | return $shell; |
| 216 | 216 | }; |
| 217 | 217 | |
| 218 | - $this->container['console'] = function ($c) { |
|
| 218 | + $this->container['console'] = function($c) { |
|
| 219 | 219 | $console = new Console(); |
| 220 | 220 | $console->setLang($c['lang']); |
| 221 | 221 | return $console; |