@@ -105,12 +105,12 @@ discard block |
||
105 | 105 | } |
106 | 106 | |
107 | 107 | // autoload presenter assets |
108 | - if (isset($config[ 'assets' ])) { |
|
109 | - $this->assets->autoload($config[ 'assets' ]); |
|
108 | + if (isset($config['assets'])) { |
|
109 | + $this->assets->autoload($config['assets']); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | // autoload presenter theme |
113 | - if(isset($config['theme'])) { |
|
113 | + if (isset($config['theme'])) { |
|
114 | 114 | $this->setTheme($config['theme']); |
115 | 115 | } |
116 | 116 | |
@@ -130,13 +130,13 @@ discard block |
||
130 | 130 | { |
131 | 131 | if (is_bool($theme)) { |
132 | 132 | $this->theme = false; |
133 | - } elseif(($moduleTheme = modules()->top()->getTheme($theme, true)) instanceof Theme) { |
|
133 | + } elseif (($moduleTheme = modules()->top()->getTheme($theme, true)) instanceof Theme) { |
|
134 | 134 | $this->theme = $moduleTheme; |
135 | - } elseif(($appTheme = modules()->first()->getTheme($theme, true)) instanceof Theme) { |
|
135 | + } elseif (($appTheme = modules()->first()->getTheme($theme, true)) instanceof Theme) { |
|
136 | 136 | $this->theme = $appTheme; |
137 | 137 | } |
138 | 138 | |
139 | - if($this->theme) { |
|
139 | + if ($this->theme) { |
|
140 | 140 | if ( ! defined('PATH_THEME')) { |
141 | 141 | define('PATH_THEME', $this->theme->getRealPath()); |
142 | 142 | } |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | // add theme assets directory |
145 | 145 | $this->assets->pushFilePath($this->theme->getRealPath()); |
146 | 146 | |
147 | - if(is_dir($themeViewPath = $this->theme->getRealPath() . 'views' . DIRECTORY_SEPARATOR)) { |
|
147 | + if (is_dir($themeViewPath = $this->theme->getRealPath() . 'views' . DIRECTORY_SEPARATOR)) { |
|
148 | 148 | |
149 | 149 | // add theme view directory |
150 | 150 | view()->addFilePath($this->theme->getRealPath()); |
@@ -154,11 +154,11 @@ discard block |
||
154 | 154 | |
155 | 155 | $modules = modules()->getArrayCopy(); |
156 | 156 | |
157 | - foreach($modules as $module) { |
|
157 | + foreach ($modules as $module) { |
|
158 | 158 | if ( ! in_array($module->getType(), ['KERNEL', 'FRAMEWORK', 'APP'])) { |
159 | 159 | $moduleResourcesPath = str_replace(PATH_RESOURCES, '', $module->getResourcesDir()); |
160 | 160 | |
161 | - if(is_dir($themeViewPath . $moduleResourcesPath)) { |
|
161 | + if (is_dir($themeViewPath . $moduleResourcesPath)) { |
|
162 | 162 | view()->pushFilePath($themeViewPath . $moduleResourcesPath); |
163 | 163 | } |
164 | 164 | } |
@@ -199,25 +199,25 @@ discard block |
||
199 | 199 | $storage = $this->storage; |
200 | 200 | |
201 | 201 | // Add Properties |
202 | - $storage[ 'meta' ] = $this->meta; |
|
203 | - $storage[ 'page' ] = $this->page; |
|
204 | - $storage[ 'assets' ] = new SplArrayObject([ |
|
202 | + $storage['meta'] = $this->meta; |
|
203 | + $storage['page'] = $this->page; |
|
204 | + $storage['assets'] = new SplArrayObject([ |
|
205 | 205 | 'head' => $this->assets->getHead(), |
206 | 206 | 'body' => $this->assets->getBody(), |
207 | 207 | ]); |
208 | - $storage[ 'partials' ] = $this->partials; |
|
209 | - $storage[ 'widgets' ] = $this->widgets; |
|
210 | - $storage[ 'theme' ] = $this->theme; |
|
208 | + $storage['partials'] = $this->partials; |
|
209 | + $storage['widgets'] = $this->widgets; |
|
210 | + $storage['theme'] = $this->theme; |
|
211 | 211 | |
212 | 212 | // Add Services |
213 | - $storage[ 'config' ] = config(); |
|
214 | - $storage[ 'language' ] = language(); |
|
215 | - $storage[ 'session' ] = session(); |
|
216 | - $storage[ 'presenter' ] = presenter(); |
|
217 | - $storage[ 'input' ] = input(); |
|
213 | + $storage['config'] = config(); |
|
214 | + $storage['language'] = language(); |
|
215 | + $storage['session'] = session(); |
|
216 | + $storage['presenter'] = presenter(); |
|
217 | + $storage['input'] = input(); |
|
218 | 218 | |
219 | 219 | if (services()->has('csrfProtection')) { |
220 | - $storage[ 'csrfToken' ] = services()->get('csrfProtection')->getToken(); |
|
220 | + $storage['csrfToken'] = services()->get('csrfProtection')->getToken(); |
|
221 | 221 | } |
222 | 222 | |
223 | 223 | return $storage; |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | } |
65 | 65 | } else { |
66 | 66 | $uriPath = urldecode( |
67 | - parse_url($_SERVER[ 'REQUEST_URI' ], PHP_URL_PATH) |
|
67 | + parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) |
|
68 | 68 | ); |
69 | 69 | |
70 | 70 | $uriPathParts = explode('public/', $uriPath); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | // Module routing |
108 | 108 | if ($numOfUriSegments = count($uriSegments)) { |
109 | 109 | if (empty($app)) { |
110 | - if (false !== ($module = modules()->getModule( reset($uriSegments) ))) { |
|
110 | + if (false !== ($module = modules()->getModule(reset($uriSegments)))) { |
|
111 | 111 | //array_shift($uriSegments); |
112 | 112 | $this->uri = $this->uri->withSegments(new KernelMessageUriSegments($uriSegments)); |
113 | 113 | $uriString = $this->uri->getSegments()->getString(); |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | } |
117 | 117 | } |
118 | 118 | |
119 | - if($numOfUriSegments = count($uriSegments)) { |
|
119 | + if ($numOfUriSegments = count($uriSegments)) { |
|
120 | 120 | for ($i = 0; $i <= $numOfUriSegments; $i++) { |
121 | 121 | $uriRoutedSegments = array_diff($uriSegments, |
122 | 122 | array_slice($uriSegments, ($numOfUriSegments - $i))); |
@@ -216,7 +216,7 @@ discard block |
||
216 | 216 | * Try to find requested page |
217 | 217 | */ |
218 | 218 | if (false !== ($pagesDir = $module->getResourcesDir('pages', true))) { |
219 | - if($controllerClassName = $this->getPagesControllerClassName()) { |
|
219 | + if ($controllerClassName = $this->getPagesControllerClassName()) { |
|
220 | 220 | |
221 | 221 | /** |
222 | 222 | * Try to find from database |
@@ -251,12 +251,12 @@ discard block |
||
251 | 251 | presenter()->page->setFile($pageFilePath); |
252 | 252 | } else { |
253 | 253 | $pageFilePath = str_replace('.phtml', DIRECTORY_SEPARATOR . 'index.phtml', $pageFilePath); |
254 | - if(is_file($pageFilePath)) { |
|
254 | + if (is_file($pageFilePath)) { |
|
255 | 255 | presenter()->page->setFile($pageFilePath); |
256 | 256 | } |
257 | 257 | } |
258 | 258 | |
259 | - if(presenter()->page->file instanceof SplFileInfo) { |
|
259 | + if (presenter()->page->file instanceof SplFileInfo) { |
|
260 | 260 | $this->setController( |
261 | 261 | (new KernelControllerDataStructure($controllerClassName)) |
262 | 262 | ->setRequestMethod('index') |
@@ -299,19 +299,19 @@ discard block |
||
299 | 299 | { |
300 | 300 | $modules = modules()->getArrayCopy(); |
301 | 301 | |
302 | - foreach($modules as $module) { |
|
302 | + foreach ($modules as $module) { |
|
303 | 303 | $controllerClassName = $module->getNamespace() . 'Controllers\Pages'; |
304 | 304 | if ($module->getNamespace() === 'O2System\Framework\\') { |
305 | 305 | $controllerClassName = 'O2System\Framework\Http\Controllers\Pages'; |
306 | 306 | } |
307 | 307 | |
308 | - if(class_exists($controllerClassName)) { |
|
308 | + if (class_exists($controllerClassName)) { |
|
309 | 309 | return $controllerClassName; |
310 | 310 | break; |
311 | 311 | } |
312 | 312 | } |
313 | 313 | |
314 | - if(class_exists('O2System\Framework\Http\Controllers\Pages')) { |
|
314 | + if (class_exists('O2System\Framework\Http\Controllers\Pages')) { |
|
315 | 315 | return 'O2System\Framework\Http\Controllers\Pages'; |
316 | 316 | } |
317 | 317 | |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | if (class_exists($controllerClassName)) { |
357 | 357 | $this->addresses->any( |
358 | 358 | '/', |
359 | - function () use ($controllerClassName) { |
|
359 | + function() use ($controllerClassName) { |
|
360 | 360 | return new $controllerClassName(); |
361 | 361 | } |
362 | 362 | ); |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | if (class_exists($controllerClassName)) { |
372 | 372 | $this->addresses->any( |
373 | 373 | '/', |
374 | - function () use ($controllerClassName) { |
|
374 | + function() use ($controllerClassName) { |
|
375 | 375 | return new $controllerClassName(); |
376 | 376 | } |
377 | 377 | ); |
@@ -423,8 +423,8 @@ discard block |
||
423 | 423 | ); |
424 | 424 | } elseif (preg_match("/([a-zA-Z0-9\\\]+)(@)([a-zA-Z0-9\\\]+)/", $closure, $matches)) { |
425 | 425 | $this->setController( |
426 | - (new KernelControllerDataStructure($matches[ 1 ])) |
|
427 | - ->setRequestMethod($matches[ 3 ]), |
|
426 | + (new KernelControllerDataStructure($matches[1])) |
|
427 | + ->setRequestMethod($matches[3]), |
|
428 | 428 | $uriSegments |
429 | 429 | ); |
430 | 430 | } elseif (presenter()->theme->use === true) { |
@@ -193,11 +193,11 @@ discard block |
||
193 | 193 | $bundleFontsFile = $this->bundleFile('assets' . DIRECTORY_SEPARATOR . 'fonts.css', |
194 | 194 | implode(PHP_EOL, $this->fonts)); |
195 | 195 | |
196 | - if (is_file($bundleFontsFile[ 'filePath' ])) { |
|
196 | + if (is_file($bundleFontsFile['filePath'])) { |
|
197 | 197 | if (input()->env('DEBUG_STAGE') === 'PRODUCTION') { |
198 | - $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $bundleFontsFile[ 'url' ] . '?v=' . $bundleFontsFile[ 'version' ] . '">'; |
|
198 | + $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $bundleFontsFile['url'] . '?v=' . $bundleFontsFile['version'] . '">'; |
|
199 | 199 | } else { |
200 | - $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $bundleFontsFile[ 'url' ] . '?v=' . $bundleFontsFile[ 'version' ] . '">'; |
|
200 | + $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $bundleFontsFile['url'] . '?v=' . $bundleFontsFile['version'] . '">'; |
|
201 | 201 | } |
202 | 202 | } |
203 | 203 | } |
@@ -233,11 +233,11 @@ discard block |
||
233 | 233 | } elseif (in_array(pathinfo($style, PATHINFO_FILENAME), ['module', 'module.min'])) { |
234 | 234 | $modulePublicFile = $this->publishFile($style); |
235 | 235 | |
236 | - if (is_file($modulePublicFile[ 'filePath' ])) { |
|
236 | + if (is_file($modulePublicFile['filePath'])) { |
|
237 | 237 | if (input()->env('DEBUG_STAGE') === 'PRODUCTION') { |
238 | - $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $modulePublicFile[ 'minify' ][ 'url' ] . '?v=' . $modulePublicFile[ 'version' ] . '">'; |
|
238 | + $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $modulePublicFile['minify']['url'] . '?v=' . $modulePublicFile['version'] . '">'; |
|
239 | 239 | } else { |
240 | - $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $modulePublicFile[ 'url' ] . '?v=' . $modulePublicFile[ 'version' ] . '">'; |
|
240 | + $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $modulePublicFile['url'] . '?v=' . $modulePublicFile['version'] . '">'; |
|
241 | 241 | } |
242 | 242 | } |
243 | 243 | } else { |
@@ -248,11 +248,11 @@ discard block |
||
248 | 248 | if (count($bundleStyleSources)) { |
249 | 249 | $bundleStylePublicFile = $this->bundleFile($bundleFilename . '.css', $bundleStyleSources); |
250 | 250 | |
251 | - if (is_file($bundleStylePublicFile[ 'filePath' ])) { |
|
251 | + if (is_file($bundleStylePublicFile['filePath'])) { |
|
252 | 252 | if (input()->env('DEBUG_STAGE') === 'PRODUCTION') { |
253 | - $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $bundleStylePublicFile[ 'minify' ][ 'url' ] . '?v=' . $bundleStylePublicFile[ 'version' ] . '">'; |
|
253 | + $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $bundleStylePublicFile['minify']['url'] . '?v=' . $bundleStylePublicFile['version'] . '">'; |
|
254 | 254 | } else { |
255 | - $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $bundleStylePublicFile[ 'url' ] . '?v=' . $bundleStylePublicFile[ 'version' ] . '">'; |
|
255 | + $output[] = '<link rel="stylesheet" type="text/css" media="all" href="' . $bundleStylePublicFile['url'] . '?v=' . $bundleStylePublicFile['version'] . '">'; |
|
256 | 256 | } |
257 | 257 | } |
258 | 258 | } |
@@ -265,15 +265,15 @@ discard block |
||
265 | 265 | foreach ($this->javascripts as $javascript) { |
266 | 266 | if (in_array(pathinfo($style, PATHINFO_FILENAME), $unbundledFilenames)) { |
267 | 267 | $fileVersion = $this->getVersion(filemtime($javascript)); |
268 | - $output[] = '<script type="text/javascript" id="js-'.pathinfo($javascript, PATHINFO_FILENAME).'" src="' . $this->getUrl($javascript) . '?v=' . $fileVersion . '"></script>'; |
|
268 | + $output[] = '<script type="text/javascript" id="js-' . pathinfo($javascript, PATHINFO_FILENAME) . '" src="' . $this->getUrl($javascript) . '?v=' . $fileVersion . '"></script>'; |
|
269 | 269 | } elseif (in_array(pathinfo($javascript, PATHINFO_FILENAME), ['module', 'module.min'])) { |
270 | 270 | $modulePublicFile = $this->publishFile($javascript); |
271 | 271 | |
272 | - if (is_file($modulePublicFile[ 'filePath' ])) { |
|
272 | + if (is_file($modulePublicFile['filePath'])) { |
|
273 | 273 | if (input()->env('DEBUG_STAGE') === 'PRODUCTION') { |
274 | - $output[] = '<script type="text/javascript" id="js-module" src="' . $modulePublicFile[ 'minify' ][ 'url' ] . '?v=' . $modulePublicFile[ 'version' ] . '"></script>'; |
|
274 | + $output[] = '<script type="text/javascript" id="js-module" src="' . $modulePublicFile['minify']['url'] . '?v=' . $modulePublicFile['version'] . '"></script>'; |
|
275 | 275 | } else { |
276 | - $output[] = '<script type="text/javascript" id="js-module" src="' . $modulePublicFile[ 'url' ] . '?v=' . $modulePublicFile[ 'version' ] . '"></script>'; |
|
276 | + $output[] = '<script type="text/javascript" id="js-module" src="' . $modulePublicFile['url'] . '?v=' . $modulePublicFile['version'] . '"></script>'; |
|
277 | 277 | } |
278 | 278 | } |
279 | 279 | } else { |
@@ -284,11 +284,11 @@ discard block |
||
284 | 284 | if (count($bundleJavascriptSources)) { |
285 | 285 | $bundleJavascriptPublicFile = $this->bundleFile($bundleFilename . '.js', $bundleJavascriptSources); |
286 | 286 | |
287 | - if (is_file($bundleJavascriptPublicFile[ 'filePath' ])) { |
|
287 | + if (is_file($bundleJavascriptPublicFile['filePath'])) { |
|
288 | 288 | if (input()->env('DEBUG_STAGE') === 'PRODUCTION') { |
289 | - $output[] = '<script type="text/javascript" id="js-bundle" src="' . $bundleJavascriptPublicFile[ 'minify' ][ 'url' ] . '?v=' . $bundleJavascriptPublicFile[ 'version' ] . '"></script>'; |
|
289 | + $output[] = '<script type="text/javascript" id="js-bundle" src="' . $bundleJavascriptPublicFile['minify']['url'] . '?v=' . $bundleJavascriptPublicFile['version'] . '"></script>'; |
|
290 | 290 | } else { |
291 | - $output[] = '<script type="text/javascript" id="js-bundle" src="' . $bundleJavascriptPublicFile[ 'url' ] . '?v=' . $bundleJavascriptPublicFile[ 'version' ] . '"></script>'; |
|
291 | + $output[] = '<script type="text/javascript" id="js-bundle" src="' . $bundleJavascriptPublicFile['url'] . '?v=' . $bundleJavascriptPublicFile['version'] . '"></script>'; |
|
292 | 292 | } |
293 | 293 | } |
294 | 294 | } |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | if (is_file($mapFilePath = $publicFilePath . '.map')) { |
174 | 174 | $mapMetadata = json_decode(file_get_contents($mapFilePath), true); |
175 | 175 | // if the file version is changed delete it first |
176 | - if ( ! hash_equals($fileVersion, $mapMetadata[ 'version' ])) { |
|
176 | + if ( ! hash_equals($fileVersion, $mapMetadata['version'])) { |
|
177 | 177 | unlink($publicFilePath); |
178 | 178 | unlink($publicMinifyFilePath); |
179 | 179 | unlink($mapFilePath); |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | if ( ! empty($content)) { |
267 | 267 | $sourcesContent[] = $content; |
268 | 268 | } else { |
269 | - unset($sources[ $key ]); |
|
269 | + unset($sources[$key]); |
|
270 | 270 | } |
271 | 271 | } |
272 | 272 | |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | if (is_file($mapFilePath = $publicFilePath . '.map')) { |
288 | 288 | $mapMetadata = json_decode(file_get_contents($mapFilePath), true); |
289 | 289 | // if the file version is changed delete it first |
290 | - if ( ! hash_equals($fileVersion, $mapMetadata[ 'version' ])) { |
|
290 | + if ( ! hash_equals($fileVersion, $mapMetadata['version'])) { |
|
291 | 291 | unlink($publicFilePath); |
292 | 292 | unlink($publicMinifyFilePath); |
293 | 293 | unlink($mapFilePath); |
@@ -111,15 +111,15 @@ discard block |
||
111 | 111 | foreach ($this->javascripts as $javascript) { |
112 | 112 | if (in_array(pathinfo($javascript, PATHINFO_FILENAME), $unbundledFilenames)) { |
113 | 113 | $fileVersion = $this->getVersion(filemtime($javascript)); |
114 | - $output[] = '<script type="text/javascript" id="js-'.pathinfo($javascript, PATHINFO_FILENAME).'" src="' . $this->getUrl($javascript) . '?v=' . $fileVersion . '"></script>'; |
|
114 | + $output[] = '<script type="text/javascript" id="js-' . pathinfo($javascript, PATHINFO_FILENAME) . '" src="' . $this->getUrl($javascript) . '?v=' . $fileVersion . '"></script>'; |
|
115 | 115 | } elseif (in_array(pathinfo($javascript, PATHINFO_FILENAME), ['module', 'module.min'])) { |
116 | 116 | $modulePublicFile = $this->publishFile($javascript); |
117 | 117 | |
118 | - if (is_file($modulePublicFile[ 'filePath' ])) { |
|
118 | + if (is_file($modulePublicFile['filePath'])) { |
|
119 | 119 | if (input()->env('DEBUG_STAGE') === 'PRODUCTION') { |
120 | - $output[] = '<script type="text/javascript" id="js-module" src="' . $modulePublicFile[ 'minify' ][ 'url' ] . '?v=' . $modulePublicFile[ 'version' ] . '"></script>'; |
|
120 | + $output[] = '<script type="text/javascript" id="js-module" src="' . $modulePublicFile['minify']['url'] . '?v=' . $modulePublicFile['version'] . '"></script>'; |
|
121 | 121 | } else { |
122 | - $output[] = '<script type="text/javascript" id="js-module" src="' . $modulePublicFile[ 'url' ] . '?v=' . $modulePublicFile[ 'version' ] . '"></script>'; |
|
122 | + $output[] = '<script type="text/javascript" id="js-module" src="' . $modulePublicFile['url'] . '?v=' . $modulePublicFile['version'] . '"></script>'; |
|
123 | 123 | } |
124 | 124 | } |
125 | 125 | } else { |
@@ -130,11 +130,11 @@ discard block |
||
130 | 130 | if (count($bundleJavascriptSources)) { |
131 | 131 | $bundleJavascriptPublicFile = $this->bundleFile($bundleFilename . '.js', $bundleJavascriptSources); |
132 | 132 | |
133 | - if (is_file($bundleJavascriptPublicFile[ 'filePath' ])) { |
|
133 | + if (is_file($bundleJavascriptPublicFile['filePath'])) { |
|
134 | 134 | if (input()->env('DEBUG_STAGE') === 'PRODUCTION') { |
135 | - $output[] = '<script type="text/javascript" id="js-bundle" src="' . $bundleJavascriptPublicFile[ 'minify' ][ 'url' ] . '?v=' . $bundleJavascriptPublicFile[ 'version' ] . '"></script>'; |
|
135 | + $output[] = '<script type="text/javascript" id="js-bundle" src="' . $bundleJavascriptPublicFile['minify']['url'] . '?v=' . $bundleJavascriptPublicFile['version'] . '"></script>'; |
|
136 | 136 | } else { |
137 | - $output[] = '<script type="text/javascript" id="js-bundle" src="' . $bundleJavascriptPublicFile[ 'url' ] . '?v=' . $bundleJavascriptPublicFile[ 'version' ] . '"></script>'; |
|
137 | + $output[] = '<script type="text/javascript" id="js-bundle" src="' . $bundleJavascriptPublicFile['url'] . '?v=' . $bundleJavascriptPublicFile['version'] . '"></script>'; |
|
138 | 138 | } |
139 | 139 | } |
140 | 140 | } |
@@ -67,8 +67,8 @@ discard block |
||
67 | 67 | $args = func_get_args(); |
68 | 68 | |
69 | 69 | if (count($args)) { |
70 | - if (isset($GLOBALS[ $args[ 0 ] ])) { |
|
71 | - return $GLOBALS[ $args[ 0 ] ]; |
|
70 | + if (isset($GLOBALS[$args[0]])) { |
|
71 | + return $GLOBALS[$args[0]]; |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | return null; |
@@ -93,8 +93,8 @@ discard block |
||
93 | 93 | $args = func_get_args(); |
94 | 94 | |
95 | 95 | if (count($args)) { |
96 | - if (isset($_ENV[ $args[ 0 ] ])) { |
|
97 | - return $_ENV[ $args[ 0 ] ]; |
|
96 | + if (isset($_ENV[$args[0]])) { |
|
97 | + return $_ENV[$args[0]]; |
|
98 | 98 | } |
99 | 99 | |
100 | 100 | return null; |
@@ -195,9 +195,9 @@ discard block |
||
195 | 195 | $args = func_get_args(); |
196 | 196 | |
197 | 197 | if (count($args) == 1) { |
198 | - return o2system()->models->autoload($args[ 0 ]); |
|
198 | + return o2system()->models->autoload($args[0]); |
|
199 | 199 | } else if (count($args) == 2) { |
200 | - return o2system()->models->autoload($args[ 0 ], $args[ 1 ]); |
|
200 | + return o2system()->models->autoload($args[0], $args[1]); |
|
201 | 201 | } |
202 | 202 | |
203 | 203 | return o2system()->models; |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | $args = func_get_args(); |
220 | 220 | |
221 | 221 | if (count($args)) { |
222 | - return o2system()->modules->getModule($args[ 0 ]); |
|
222 | + return o2system()->modules->getModule($args[0]); |
|
223 | 223 | } |
224 | 224 | |
225 | 225 | return o2system()->modules; |
@@ -261,8 +261,8 @@ discard block |
||
261 | 261 | $args = func_get_args(); |
262 | 262 | |
263 | 263 | if (count($args)) { |
264 | - if (isset($_SESSION[ $args[ 0 ] ])) { |
|
265 | - return $_SESSION[ $args[ 0 ] ]; |
|
264 | + if (isset($_SESSION[$args[0]])) { |
|
265 | + return $_SESSION[$args[0]]; |
|
266 | 266 | } |
267 | 267 | |
268 | 268 | return null; |