@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | public static function getInstance() |
| 50 | 50 | { |
| 51 | - if(!self::$xInstance) |
|
| 51 | + if (!self::$xInstance) |
|
| 52 | 52 | { |
| 53 | 53 | self::$xInstance = new Container(); |
| 54 | 54 | } |
@@ -108,15 +108,15 @@ discard block |
||
| 108 | 108 | * Core library objects |
| 109 | 109 | */ |
| 110 | 110 | // Jaxon Core |
| 111 | - $this->coreContainer[Jaxon::class] = function () { |
|
| 111 | + $this->coreContainer[Jaxon::class] = function() { |
|
| 112 | 112 | return new Jaxon(); |
| 113 | 113 | }; |
| 114 | 114 | // Global Response |
| 115 | - $this->coreContainer[Response::class] = function () { |
|
| 115 | + $this->coreContainer[Response::class] = function() { |
|
| 116 | 116 | return new Response(); |
| 117 | 117 | }; |
| 118 | 118 | // Dialog |
| 119 | - $this->coreContainer[Dialog::class] = function () { |
|
| 119 | + $this->coreContainer[Dialog::class] = function() { |
|
| 120 | 120 | return new Dialog(); |
| 121 | 121 | }; |
| 122 | 122 | |
@@ -124,37 +124,37 @@ discard block |
||
| 124 | 124 | * Managers |
| 125 | 125 | */ |
| 126 | 126 | // Callable objects repository |
| 127 | - $this->coreContainer[CallableRepository::class] = function () { |
|
| 127 | + $this->coreContainer[CallableRepository::class] = function() { |
|
| 128 | 128 | return new CallableRepository(); |
| 129 | 129 | }; |
| 130 | 130 | // Plugin Manager |
| 131 | - $this->coreContainer[PluginManager::class] = function () { |
|
| 131 | + $this->coreContainer[PluginManager::class] = function() { |
|
| 132 | 132 | return new PluginManager(); |
| 133 | 133 | }; |
| 134 | 134 | // Request Handler |
| 135 | - $this->coreContainer[RequestHandler::class] = function ($c) { |
|
| 135 | + $this->coreContainer[RequestHandler::class] = function($c) { |
|
| 136 | 136 | return new RequestHandler($c[PluginManager::class]); |
| 137 | 137 | }; |
| 138 | 138 | // Request Factory |
| 139 | - $this->coreContainer[RequestFactory::class] = function ($c) { |
|
| 139 | + $this->coreContainer[RequestFactory::class] = function($c) { |
|
| 140 | 140 | return new RequestFactory($c[CallableRepository::class]); |
| 141 | 141 | }; |
| 142 | 142 | // Response Manager |
| 143 | - $this->coreContainer[ResponseManager::class] = function () { |
|
| 143 | + $this->coreContainer[ResponseManager::class] = function() { |
|
| 144 | 144 | return new ResponseManager(); |
| 145 | 145 | }; |
| 146 | 146 | // Code Generator |
| 147 | - $this->coreContainer[CodeGenerator::class] = function ($c) { |
|
| 147 | + $this->coreContainer[CodeGenerator::class] = function($c) { |
|
| 148 | 148 | return new CodeGenerator($c[PluginManager::class]); |
| 149 | 149 | }; |
| 150 | 150 | |
| 151 | 151 | /* |
| 152 | 152 | * Config |
| 153 | 153 | */ |
| 154 | - $this->coreContainer[Config::class] = function () { |
|
| 154 | + $this->coreContainer[Config::class] = function() { |
|
| 155 | 155 | return new Config(); |
| 156 | 156 | }; |
| 157 | - $this->coreContainer[ConfigReader::class] = function () { |
|
| 157 | + $this->coreContainer[ConfigReader::class] = function() { |
|
| 158 | 158 | return new ConfigReader(); |
| 159 | 159 | }; |
| 160 | 160 | |
@@ -162,31 +162,31 @@ discard block |
||
| 162 | 162 | * Services |
| 163 | 163 | */ |
| 164 | 164 | // Minifier |
| 165 | - $this->coreContainer[Minifier::class] = function () { |
|
| 165 | + $this->coreContainer[Minifier::class] = function() { |
|
| 166 | 166 | return new Minifier(); |
| 167 | 167 | }; |
| 168 | 168 | // Translator |
| 169 | - $this->coreContainer[Translator::class] = function ($c) { |
|
| 169 | + $this->coreContainer[Translator::class] = function($c) { |
|
| 170 | 170 | return new Translator($c['jaxon.core.translation_dir'], $c[Config::class]); |
| 171 | 171 | }; |
| 172 | 172 | // Template engine |
| 173 | - $this->coreContainer[Template::class] = function ($c) { |
|
| 173 | + $this->coreContainer[Template::class] = function($c) { |
|
| 174 | 174 | return new Template($c['jaxon.core.template_dir']); |
| 175 | 175 | }; |
| 176 | 176 | // Validator |
| 177 | - $this->coreContainer[Validator::class] = function ($c) { |
|
| 177 | + $this->coreContainer[Validator::class] = function($c) { |
|
| 178 | 178 | return new Validator($c[Translator::class], $c[Config::class]); |
| 179 | 179 | }; |
| 180 | 180 | // Pagination Renderer |
| 181 | - $this->coreContainer[PaginationRenderer::class] = function ($c) { |
|
| 181 | + $this->coreContainer[PaginationRenderer::class] = function($c) { |
|
| 182 | 182 | return new PaginationRenderer($c[Template::class]); |
| 183 | 183 | }; |
| 184 | 184 | // Pagination Paginator |
| 185 | - $this->coreContainer[Paginator::class] = function ($c) { |
|
| 185 | + $this->coreContainer[Paginator::class] = function($c) { |
|
| 186 | 186 | return new Paginator($c[PaginationRenderer::class]); |
| 187 | 187 | }; |
| 188 | 188 | // Event Dispatcher |
| 189 | - $this->coreContainer[EventDispatcher::class] = function () { |
|
| 189 | + $this->coreContainer[EventDispatcher::class] = function() { |
|
| 190 | 190 | return new EventDispatcher(); |
| 191 | 191 | }; |
| 192 | 192 | |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | */ |
| 206 | 206 | public function get($sClass) |
| 207 | 207 | { |
| 208 | - if($this->sentryContainer != null && $this->sentryContainer->has($sClass)) |
|
| 208 | + if ($this->sentryContainer != null && $this->sentryContainer->has($sClass)) |
|
| 209 | 209 | { |
| 210 | 210 | return $this->sentryContainer->get($sClass); |
| 211 | 211 | } |
@@ -500,14 +500,14 @@ discard block |
||
| 500 | 500 | $this->coreContainer['jaxon.sentry.view.base.' . $sId] = $xClosure; |
| 501 | 501 | |
| 502 | 502 | // Return the initialized view renderer |
| 503 | - $this->coreContainer['jaxon.sentry.view.' . $sId] = function ($c) use ($sId) { |
|
| 503 | + $this->coreContainer['jaxon.sentry.view.' . $sId] = function($c) use ($sId) { |
|
| 504 | 504 | // Get the defined renderer |
| 505 | 505 | $renderer = $c['jaxon.sentry.view.base.' . $sId]; |
| 506 | 506 | // Init the renderer with the template namespaces |
| 507 | 507 | $aNamespaces = $this->coreContainer['jaxon.view.data.namespaces']; |
| 508 | - if(key_exists($sId, $aNamespaces)) |
|
| 508 | + if (key_exists($sId, $aNamespaces)) |
|
| 509 | 509 | { |
| 510 | - foreach($aNamespaces[$sId] as $ns) |
|
| 510 | + foreach ($aNamespaces[$sId] as $ns) |
|
| 511 | 511 | { |
| 512 | 512 | $renderer->addNamespace($ns['namespace'], $ns['directory'], $ns['extension']); |
| 513 | 513 | } |
@@ -525,7 +525,7 @@ discard block |
||
| 525 | 525 | */ |
| 526 | 526 | public function getViewRenderer($sId = '') |
| 527 | 527 | { |
| 528 | - if(!$sId) |
|
| 528 | + if (!$sId) |
|
| 529 | 529 | { |
| 530 | 530 | // Return the view renderer facade |
| 531 | 531 | return $this->coreContainer[\Jaxon\Sentry\View\Facade::class]; |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | */ |
| 26 | 26 | protected function alert($message) |
| 27 | 27 | { |
| 28 | - if($this->getReturn()) |
|
| 28 | + if ($this->getReturn()) |
|
| 29 | 29 | { |
| 30 | 30 | return 'alert(' . $message . ')'; |
| 31 | 31 | } |