File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -15,9 +15,8 @@ class Application {
1515
1616 public function __construct ($ config = [])
1717 {
18- self ::$ ROOT_DIR = $ config ['root ' ];
19- self ::$ app = $ this ;
2018 $ this ->LoadSettings ($ config );
19+ self ::$ app = $ this ;
2120
2221 $ this ->user = null ;
2322 $ this ->userClass = $ config ['userClass ' ];
@@ -40,8 +39,10 @@ public function __construct($config = [])
4039 * TODO: Add checking on $config keys before assigning
4140 */
4241 public function LoadSettings ($ config ) {
42+ self ::$ ROOT_DIR = $ config ['root ' ];
4343 $ this ->config ['app ' ] = $ config ['app ' ];
4444 $ this ->config ['auth ' ] = $ config ['auth ' ];
45+ $ this ->config ['environment ' ] = $ config ['environment ' ];
4546 $ this ->config ['connections ' ] = $ config ['connections ' ];
4647
4748 // Load env file
Original file line number Diff line number Diff line change @@ -16,21 +16,21 @@ public function Compose() {
1616
1717 switch (Application::$ app ->config ->env ->APP_ENV ) {
1818 case "local " :
19- $ path = str_replace (Application::$ app ->config ->app -> path ->local , "/ " , $ path );
19+ $ path = str_replace (Application::$ app ->config ->environment ->local , "/ " , $ path );
2020 break ;
2121 case "sandbox " :
22- $ path = str_replace (Application::$ app ->config ->app -> path ->sandbox , "/ " , $ path );
22+ $ path = str_replace (Application::$ app ->config ->environment ->sandbox , "/ " , $ path );
2323 break ;
2424 case "live " :
25- $ path = str_replace (Application::$ app ->config ->app -> path ->live , "/ " , $ path );
25+ $ path = str_replace (Application::$ app ->config ->environment ->live , "/ " , $ path );
2626 break ;
2727 }
2828 return $ path ;
2929 }
3030
3131 public function GetUrl ()
3232 {
33- $ path = $ this ->Composer ();
33+ $ path = $ this ->Compose ();
3434
3535 if ($ path != '/ ' ) {
3636 $ path = str_replace ('/ ' , '' , $ path );
@@ -50,7 +50,7 @@ public function GetUrl()
5050
5151 public function GetUrlConverted ()
5252 {
53- $ path = $ this ->Composer ();
53+ $ path = $ this ->Compose ();
5454
5555 if ($ path != '/ ' ) {
5656 $ path = str_replace ('/ ' , '' , $ path );
You can’t perform that action at this time.
0 commit comments