@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | public static function getInstance() |
| 29 | 29 | { |
| 30 | - if(!self::$xInstance) |
|
| 30 | + if (!self::$xInstance) |
|
| 31 | 31 | { |
| 32 | 32 | self::$xInstance = new Container(); |
| 33 | 33 | } |
@@ -65,19 +65,19 @@ discard block |
||
| 65 | 65 | * Managers |
| 66 | 66 | */ |
| 67 | 67 | // Plugin Manager |
| 68 | - $this->di['plugin_manager'] = function ($c) { |
|
| 68 | + $this->di['plugin_manager'] = function($c) { |
|
| 69 | 69 | return new \Jaxon\Plugin\Manager(); |
| 70 | 70 | }; |
| 71 | 71 | // Request Manager |
| 72 | - $this->di['request_manager'] = function ($c) { |
|
| 72 | + $this->di['request_manager'] = function($c) { |
|
| 73 | 73 | return new \Jaxon\Request\Manager(); |
| 74 | 74 | }; |
| 75 | 75 | // Request Factory |
| 76 | - $this->di['request_factory'] = function ($c) { |
|
| 76 | + $this->di['request_factory'] = function($c) { |
|
| 77 | 77 | return new \Jaxon\Request\Factory(); |
| 78 | 78 | }; |
| 79 | 79 | // Response Manager |
| 80 | - $this->di['response_manager'] = function ($c) { |
|
| 80 | + $this->di['response_manager'] = function($c) { |
|
| 81 | 81 | return new \Jaxon\Response\Manager(); |
| 82 | 82 | }; |
| 83 | 83 | |
@@ -85,35 +85,35 @@ discard block |
||
| 85 | 85 | * Services |
| 86 | 86 | */ |
| 87 | 87 | // Config manager |
| 88 | - $this->di['config'] = function ($c) { |
|
| 88 | + $this->di['config'] = function($c) { |
|
| 89 | 89 | return new Config\Config(); |
| 90 | 90 | }; |
| 91 | 91 | // Minifier |
| 92 | - $this->di['minifier'] = function ($c) { |
|
| 92 | + $this->di['minifier'] = function($c) { |
|
| 93 | 93 | return new Template\Minifier(); |
| 94 | 94 | }; |
| 95 | 95 | // Translator |
| 96 | - $this->di['translator'] = function ($c) { |
|
| 96 | + $this->di['translator'] = function($c) { |
|
| 97 | 97 | return new Translation\Translator($c['translation_dir'], $c['config']); |
| 98 | 98 | }; |
| 99 | 99 | // Template engine |
| 100 | - $this->di['template'] = function ($c) { |
|
| 100 | + $this->di['template'] = function($c) { |
|
| 101 | 101 | return new Template\Template($c['template_dir']); |
| 102 | 102 | }; |
| 103 | 103 | // Validator |
| 104 | - $this->di['validator'] = function ($c) { |
|
| 104 | + $this->di['validator'] = function($c) { |
|
| 105 | 105 | return new Validation\Validator($c['translator'], $c['config']); |
| 106 | 106 | }; |
| 107 | 107 | // Pagination Renderer |
| 108 | - $this->di['pagination.renderer'] = function ($c) { |
|
| 108 | + $this->di['pagination.renderer'] = function($c) { |
|
| 109 | 109 | return new Pagination\Renderer(); |
| 110 | 110 | }; |
| 111 | 111 | // Pagination Paginator |
| 112 | - $this->di['pagination.paginator'] = function ($c) { |
|
| 112 | + $this->di['pagination.paginator'] = function($c) { |
|
| 113 | 113 | return new Pagination\Paginator($c['pagination.renderer']); |
| 114 | 114 | }; |
| 115 | 115 | // Event Dispatcher |
| 116 | - $this->di['events'] = function ($c) { |
|
| 116 | + $this->di['events'] = function($c) { |
|
| 117 | 117 | return new EventDispatcher(); |
| 118 | 118 | }; |
| 119 | 119 | |
@@ -121,15 +121,15 @@ discard block |
||
| 121 | 121 | * Core library objects |
| 122 | 122 | */ |
| 123 | 123 | // Global Response |
| 124 | - $this->di['response'] = function ($c) { |
|
| 124 | + $this->di['response'] = function($c) { |
|
| 125 | 125 | return new \Jaxon\Response\Response(); |
| 126 | 126 | }; |
| 127 | 127 | // Jaxon Core |
| 128 | - $this->di['jaxon'] = function ($c) { |
|
| 128 | + $this->di['jaxon'] = function($c) { |
|
| 129 | 129 | return new \Jaxon\Jaxon(); |
| 130 | 130 | }; |
| 131 | 131 | // View Renderer Facade |
| 132 | - $this->di['sentry.view.renderer'] = function ($c) { |
|
| 132 | + $this->di['sentry.view.renderer'] = function($c) { |
|
| 133 | 133 | $aRenderers = $c['view.data.renderers']; |
| 134 | 134 | $sDefaultNamespace = $c['view.data.namespace.default']; |
| 135 | 135 | return new \Jaxon\Sentry\View\Facade($aRenderers, $sDefaultNamespace); |
@@ -391,14 +391,14 @@ discard block |
||
| 391 | 391 | $this->di['sentry.view.base.' . $sId] = $xClosure; |
| 392 | 392 | |
| 393 | 393 | // Return the initialized view renderer |
| 394 | - $this->di['sentry.view.' . $sId] = function ($c) use ($sId) { |
|
| 394 | + $this->di['sentry.view.' . $sId] = function($c) use ($sId) { |
|
| 395 | 395 | // Get the defined renderer |
| 396 | 396 | $renderer = $c['sentry.view.base.' . $sId]; |
| 397 | 397 | // Init the renderer with the template namespaces |
| 398 | 398 | $aNamespaces = $this->di['view.data.namespaces']; |
| 399 | - if(key_exists($sId, $aNamespaces)) |
|
| 399 | + if (key_exists($sId, $aNamespaces)) |
|
| 400 | 400 | { |
| 401 | - foreach($aNamespaces[$sId] as $ns) |
|
| 401 | + foreach ($aNamespaces[$sId] as $ns) |
|
| 402 | 402 | { |
| 403 | 403 | $renderer->addNamespace($ns['namespace'], $ns['directory'], $ns['extension']); |
| 404 | 404 | } |
@@ -416,7 +416,7 @@ discard block |
||
| 416 | 416 | */ |
| 417 | 417 | public function getViewRenderer($sId = '') |
| 418 | 418 | { |
| 419 | - if(!$sId) |
|
| 419 | + if (!$sId) |
|
| 420 | 420 | { |
| 421 | 421 | // Return the view renderer facade |
| 422 | 422 | return $this->di['sentry.view.renderer']; |