@@ -241,7 +241,7 @@ |
||
241 | 241 | /** |
242 | 242 | * Create a new the config manager |
243 | 243 | * |
244 | - * @return Jaxon\Utils\Config\Config The config manager |
|
244 | + * @return \Jaxon\Utils\Config\Config The config manager |
|
245 | 245 | */ |
246 | 246 | public function newConfig() |
247 | 247 | { |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | |
31 | 31 | public static function getInstance() |
32 | 32 | { |
33 | - if(!self::$xInstance) |
|
33 | + if (!self::$xInstance) |
|
34 | 34 | { |
35 | 35 | self::$xInstance = new Container(); |
36 | 36 | } |
@@ -90,19 +90,19 @@ discard block |
||
90 | 90 | * Managers |
91 | 91 | */ |
92 | 92 | // Plugin Manager |
93 | - $this->coreContainer['jaxon.core.plugin_manager'] = function ($c) { |
|
93 | + $this->coreContainer['jaxon.core.plugin_manager'] = function($c) { |
|
94 | 94 | return new \Jaxon\Plugin\Manager(); |
95 | 95 | }; |
96 | 96 | // Request Manager |
97 | - $this->coreContainer['jaxon.core.request_manager'] = function ($c) { |
|
97 | + $this->coreContainer['jaxon.core.request_manager'] = function($c) { |
|
98 | 98 | return new \Jaxon\Request\Manager(); |
99 | 99 | }; |
100 | 100 | // Request Factory |
101 | - $this->coreContainer['jaxon.core.request_factory'] = function ($c) { |
|
101 | + $this->coreContainer['jaxon.core.request_factory'] = function($c) { |
|
102 | 102 | return new \Jaxon\Request\Factory(); |
103 | 103 | }; |
104 | 104 | // Response Manager |
105 | - $this->coreContainer['jaxon.core.response_manager'] = function ($c) { |
|
105 | + $this->coreContainer['jaxon.core.response_manager'] = function($c) { |
|
106 | 106 | return new \Jaxon\Response\Manager(); |
107 | 107 | }; |
108 | 108 | |
@@ -110,35 +110,35 @@ discard block |
||
110 | 110 | * Services |
111 | 111 | */ |
112 | 112 | // Config manager |
113 | - $this->coreContainer['jaxon.core.config'] = function ($c) { |
|
113 | + $this->coreContainer['jaxon.core.config'] = function($c) { |
|
114 | 114 | return new \Jaxon\Utils\Config\Config(); |
115 | 115 | }; |
116 | 116 | // Minifier |
117 | - $this->coreContainer['jaxon.core.minifier'] = function ($c) { |
|
117 | + $this->coreContainer['jaxon.core.minifier'] = function($c) { |
|
118 | 118 | return new \Jaxon\Utils\Template\Minifier(); |
119 | 119 | }; |
120 | 120 | // Translator |
121 | - $this->coreContainer['jaxon.core.translator'] = function ($c) { |
|
121 | + $this->coreContainer['jaxon.core.translator'] = function($c) { |
|
122 | 122 | return new \Jaxon\Utils\Translation\Translator($c['jaxon.core.translation_dir'], $c['jaxon.core.config']); |
123 | 123 | }; |
124 | 124 | // Template engine |
125 | - $this->coreContainer['jaxon.core.template'] = function ($c) { |
|
125 | + $this->coreContainer['jaxon.core.template'] = function($c) { |
|
126 | 126 | return new \Jaxon\Utils\Template\Template($c['jaxon.core.template_dir']); |
127 | 127 | }; |
128 | 128 | // Validator |
129 | - $this->coreContainer['jaxon.core.validator'] = function ($c) { |
|
129 | + $this->coreContainer['jaxon.core.validator'] = function($c) { |
|
130 | 130 | return new \Jaxon\Utils\Validation\Validator($c['jaxon.core.translator'], $c['jaxon.core.config']); |
131 | 131 | }; |
132 | 132 | // Pagination Renderer |
133 | - $this->coreContainer['jaxon.pagination.renderer'] = function ($c) { |
|
133 | + $this->coreContainer['jaxon.pagination.renderer'] = function($c) { |
|
134 | 134 | return new \Jaxon\Utils\Pagination\Renderer(); |
135 | 135 | }; |
136 | 136 | // Pagination Paginator |
137 | - $this->coreContainer['jaxon.pagination.paginator'] = function ($c) { |
|
137 | + $this->coreContainer['jaxon.pagination.paginator'] = function($c) { |
|
138 | 138 | return new \Jaxon\Utils\Pagination\Paginator($c['jaxon.pagination.renderer']); |
139 | 139 | }; |
140 | 140 | // Event Dispatcher |
141 | - $this->coreContainer['jaxon.core.events'] = function ($c) { |
|
141 | + $this->coreContainer['jaxon.core.events'] = function($c) { |
|
142 | 142 | return new EventDispatcher(); |
143 | 143 | }; |
144 | 144 | |
@@ -146,15 +146,15 @@ discard block |
||
146 | 146 | * Core library objects |
147 | 147 | */ |
148 | 148 | // Global Response |
149 | - $this->coreContainer['jaxon.core.response'] = function ($c) { |
|
149 | + $this->coreContainer['jaxon.core.response'] = function($c) { |
|
150 | 150 | return new \Jaxon\Response\Response(); |
151 | 151 | }; |
152 | 152 | // Jaxon Core |
153 | - $this->coreContainer['jaxon.core.jaxon'] = function ($c) { |
|
153 | + $this->coreContainer['jaxon.core.jaxon'] = function($c) { |
|
154 | 154 | return new \Jaxon\Jaxon(); |
155 | 155 | }; |
156 | 156 | // View Renderer Facade |
157 | - $this->coreContainer['jaxon.sentry.view.renderer'] = function ($c) { |
|
157 | + $this->coreContainer['jaxon.sentry.view.renderer'] = function($c) { |
|
158 | 158 | $aRenderers = $c['jaxon.view.data.renderers']; |
159 | 159 | $sDefaultNamespace = $c['jaxon.view.data.namespace.default']; |
160 | 160 | return new \Jaxon\Sentry\View\Facade($aRenderers, $sDefaultNamespace); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | */ |
169 | 169 | public function get($sClass) |
170 | 170 | { |
171 | - if($this->sentryContainer != null && $this->sentryContainer->has($sClass)) |
|
171 | + if ($this->sentryContainer != null && $this->sentryContainer->has($sClass)) |
|
172 | 172 | { |
173 | 173 | return $this->sentryContainer->get($sClass); |
174 | 174 | } |
@@ -443,14 +443,14 @@ discard block |
||
443 | 443 | $this->coreContainer['jaxon.sentry.view.base.' . $sId] = $xClosure; |
444 | 444 | |
445 | 445 | // Return the initialized view renderer |
446 | - $this->coreContainer['jaxon.sentry.view.' . $sId] = function ($c) use ($sId) { |
|
446 | + $this->coreContainer['jaxon.sentry.view.' . $sId] = function($c) use ($sId) { |
|
447 | 447 | // Get the defined renderer |
448 | 448 | $renderer = $c['jaxon.sentry.view.base.' . $sId]; |
449 | 449 | // Init the renderer with the template namespaces |
450 | 450 | $aNamespaces = $this->coreContainer['jaxon.view.data.namespaces']; |
451 | - if(key_exists($sId, $aNamespaces)) |
|
451 | + if (key_exists($sId, $aNamespaces)) |
|
452 | 452 | { |
453 | - foreach($aNamespaces[$sId] as $ns) |
|
453 | + foreach ($aNamespaces[$sId] as $ns) |
|
454 | 454 | { |
455 | 455 | $renderer->addNamespace($ns['namespace'], $ns['directory'], $ns['extension']); |
456 | 456 | } |
@@ -468,7 +468,7 @@ discard block |
||
468 | 468 | */ |
469 | 469 | public function getViewRenderer($sId = '') |
470 | 470 | { |
471 | - if(!$sId) |
|
471 | + if (!$sId) |
|
472 | 472 | { |
473 | 473 | // Return the view renderer facade |
474 | 474 | return $this->coreContainer['jaxon.sentry.view.renderer']; |
@@ -25,14 +25,9 @@ |
||
25 | 25 | |
26 | 26 | namespace Jaxon; |
27 | 27 | |
28 | -use Jaxon\Plugin\Manager as PluginManager; |
|
29 | -use Jaxon\Request\Manager as RequestManager; |
|
30 | -use Jaxon\Response\Manager as ResponseManager; |
|
31 | - |
|
32 | 28 | use Jaxon\Utils\URI; |
33 | 29 | use Jaxon\DI\Container; |
34 | 30 | use Exception; |
35 | -use Closure; |
|
36 | 31 | |
37 | 32 | class Jaxon |
38 | 33 | { |
@@ -19,8 +19,6 @@ |
||
19 | 19 | |
20 | 20 | namespace Jaxon\Traits; |
21 | 21 | |
22 | -use Jaxon\DI\Container; |
|
23 | - |
|
24 | 22 | trait Autoload |
25 | 23 | { |
26 | 24 | /** |
@@ -19,8 +19,6 @@ |
||
19 | 19 | |
20 | 20 | namespace Jaxon\Traits; |
21 | 21 | |
22 | -use Jaxon\DI\Container; |
|
23 | - |
|
24 | 22 | trait Plugin |
25 | 23 | { |
26 | 24 | /** |