2020*/
2121Core \Alias::init ();
2222
23+ /*
24+ |--------------------------------------------------------------------------
25+ | Set the default timezone
26+ |--------------------------------------------------------------------------
27+ |
28+ | Reads the configuration file (config/datetime.php) and set timezone
29+ |
30+ */
31+ TimeTrackr::init ();
32+
2333/*
2434|--------------------------------------------------------------------------
2535| Creating the Singleton
2939| maintaining only one instantiation of a class.
3040|
3141*/
32- $ app = new Core \App ;
33-
34-
35- date_default_timezone_set ( 'Asia/Kuala_Lumpur ' );
36-
42+ $ app = new App ;
3743
3844/*
3945|--------------------------------------------------------------------------
4349| Connect the database for only once. Save the planet.
4450|
4551*/
46- $ app ->link ('database ' , Core \ Database::connect ());
52+ $ app ->link ('database ' , Database::connect ());
4753
4854/*
4955|--------------------------------------------------------------------------
5460| capabilities.
5561|
5662*/
57- $ app ->link ('cachemanager ' , Core \ Cache::init ());
63+ $ app ->link ('cachemanager ' , Cache::init ());
5864
5965/*
6066|--------------------------------------------------------------------------
61- | Share the Singleton $app with the Template Files
67+ | Load Services
6268|--------------------------------------------------------------------------
6369|
64- | Eliminate complexity, get the job done .
70+ | This is where all of your applications in /app/Service are loaded .
6571|
6672*/
67- Core \Sharer:: share ( ' app ' , $ app );
73+ $ service = Service:: loadServices ( );
6874
6975/*
7076|--------------------------------------------------------------------------
71- | Load Services
77+ | Share the Singleton $app and $service
7278|--------------------------------------------------------------------------
7379|
74- | This is where all of your applications resides
80+ | Eliminate complexity, get the job done. Our Dependency Injection (DI) is
81+ | here!
7582|
7683*/
77- $ service = Core \Service::loadServices ();
78-
79- Core \Sharer::share ('service ' , $ service );
84+ Sharer::share ('app ' , $ app );
85+ Sharer::share ('service ' , $ service );
8086
8187/*
8288|--------------------------------------------------------------------------
8793|
8894*/
8995
90- Core \ Router::start ();
91- Core \ Router::dispatch ();
96+ Router::start ();
97+ Router::dispatch ();
9298
9399/*
94100|--------------------------------------------------------------------------
100106|
101107*/
102108if (getenv ('SHOW_EXECUTION_TIME ' )){
103- Core \ Debugger::exec_time ();
104- }
109+ Debugger::exec_time ();
110+ }
0 commit comments