mirror of
https://github.com/friendica/friendica
synced 2025-04-24 10:30:11 +00:00
Set BaseObject::setApp in App
This commit is contained in:
parent
e952d6677b
commit
decfc553f7
7 changed files with 7 additions and 21 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue