Friendica Communications Platform
(please note that this is a clone of the repository at github, issues are handled there)
https://friendi.ca
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
570 B
47 lines
570 B
<?php |
|
/** |
|
* @file src/BaseObject.php |
|
*/ |
|
namespace Friendica; |
|
|
|
require_once 'boot.php'; |
|
|
|
/** |
|
* Basic object |
|
* |
|
* Contains what is useful to any object |
|
*/ |
|
class BaseObject |
|
{ |
|
private static $app = null; |
|
|
|
/** |
|
* Get the app |
|
* |
|
* Same as get_app from boot.php |
|
* |
|
* @return App |
|
*/ |
|
public static function getApp() |
|
{ |
|
if (self::$app) { |
|
return self::$app; |
|
} |
|
|
|
self::$app = get_app(); |
|
|
|
return self::$app; |
|
} |
|
|
|
/** |
|
* Set the app |
|
* |
|
* @param object $app App |
|
* |
|
* @return void |
|
*/ |
|
public static function setApp($app) |
|
{ |
|
self::$app = $app; |
|
} |
|
}
|
|
|