@@ -253,6 +253,18 @@ protected function __construct()
253
253
$ this ->services ->load ($ className , $ classOffset );
254
254
}
255
255
256
+ // Instantiate Globals Container
257
+ if (profiler () !== false ) {
258
+ profiler ()->watch ('Starting Globals Container ' );
259
+ }
260
+ $ this ->globals = new Kernel \DataStructures \Input \Globals ();
261
+
262
+ // Instantiate Environment Container
263
+ if (profiler () !== false ) {
264
+ profiler ()->watch ('Starting Environment Container ' );
265
+ }
266
+ $ this ->env = new Kernel \DataStructures \Input \Env ();
267
+
256
268
// Instantiate Config Container
257
269
if (profiler () !== false ) {
258
270
profiler ()->watch ('Starting Config Container ' );
@@ -282,18 +294,6 @@ protected function __construct()
282
294
// Instantiate Loader Service
283
295
$ this ->services ->load ('Services\Loader ' , 'loader ' );
284
296
285
- // Instantiate Globals Container
286
- if (profiler () !== false ) {
287
- profiler ()->watch ('Starting Globals Container ' );
288
- }
289
- $ this ->globals = new Kernel \DataStructures \Input \Globals ();
290
-
291
- // Instantiate Environment Container
292
- if (profiler () !== false ) {
293
- profiler ()->watch ('Starting Environment Container ' );
294
- }
295
- $ this ->env = new Kernel \DataStructures \Input \Env ();
296
-
297
297
// Instantiate Models Container
298
298
if (profiler () !== false ) {
299
299
profiler ()->watch ('Starting Models Container ' );
@@ -330,7 +330,7 @@ protected function __reconstruct()
330
330
331
331
if (is_cli ()) {
332
332
// Instantiate CLI Router Service
333
- $ this ->services ->load (Kernel \Cli \Router::class);
333
+ $ this ->services ->load (Framework \Cli \Router::class);
334
334
335
335
$ this ->cliHandler ();
336
336
} else {
@@ -385,7 +385,7 @@ private function cliHandler()
385
385
}
386
386
$ requestCommander = $ commander ->getInstance ();
387
387
388
- if (method_exists ($ requestController , '__reconstruct ' )) {
388
+ if (method_exists ($ requestCommander , '__reconstruct ' )) {
389
389
$ requestCommander ->__reconstruct ();
390
390
}
391
391
@@ -441,12 +441,12 @@ private function httpHandler()
441
441
}
442
442
443
443
if ($ this ->modules instanceof Framework \Containers \Modules) {
444
- if ( empty ( $ this -> config -> get ( ' app ' ))) {
445
- $ app = ( new Framework \ Containers \ Modules \ DataStructures \ Module ( PATH_APP ) )
446
- -> setType ( ' APP ' )
447
- -> setNamespace ( ' App \\' );
448
- $ this -> modules -> register ( $ app );
449
- } else {
444
+ $ app = ( new Framework \ Containers \ Modules \ DataStructures \ Module ( PATH_APP ))
445
+ -> setType ( ' APP ' )
446
+ -> setNamespace ( ' App \\' );
447
+ $ this -> modules -> register ( $ app );
448
+
449
+ if ( $ this -> config -> get ( ' app ' ) !== null ) {
450
450
$ app = (new Framework \Containers \Modules \DataStructures \Module (PATH_APP . $ this ->config ->get ('app ' ) . DIRECTORY_SEPARATOR ))
451
451
->setType ('APP ' )
452
452
->setNamespace ('App \\' . studlycase ($ this ->config ->get ('app ' )) . '\\' );
@@ -612,6 +612,10 @@ private function httpHandler()
612
612
}
613
613
} elseif ($ this ->services ->has ('view ' )) {
614
614
if (empty ($ requestControllerOutput ) or $ requestControllerOutput === '' ) {
615
+ if (presenter ()->page ->offsetExists ('content ' )) {
616
+ presenter ()->partials ->offsetSet ('content ' , presenter ()->page ->offsetGet ('content ' ));
617
+ }
618
+
615
619
if (presenter ()->partials ->offsetExists ('content ' )) {
616
620
$ htmlOutput = view ()->render ();
617
621
0 commit comments