Set BaseObject::setApp in App

This commit is contained in:
Hypolite Petovan 2018-06-25 20:44:35 -04:00
parent e952d6677b
commit decfc553f7
7 changed files with 7 additions and 21 deletions

View file

@ -24,12 +24,10 @@ class BaseObject
*/
public static function getApp()
{
if (self::$app) {
return self::$app;
if (empty(self::$app)) {
self::$app = new App(dirname(__DIR__));
}
self::$app = get_app();
return self::$app;
}
@ -40,7 +38,7 @@ class BaseObject
*
* @return void
*/
public static function setApp($app)
public static function setApp(App $app)
{
self::$app = $app;
}