mirror of
https://github.com/friendica/friendica
synced 2024-05-21 13:16:43 +02:00
4a1de47513
BaseObject moved to Friendica\Core namespace. References and function calls updated.
48 lines
586 B
PHP
48 lines
586 B
PHP
<?php
|
|
/**
|
|
* @file src/Core/BaseObject.php
|
|
*/
|
|
namespace Friendica\Core;
|
|
|
|
if (class_exists('BaseObject')) {
|
|
return;
|
|
}
|
|
|
|
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
|
|
*/
|
|
public function get_app()
|
|
{
|
|
if (self::$app) {
|
|
return self::$app;
|
|
}
|
|
|
|
self::$app = boot::get_app();
|
|
|
|
return self::$app;
|
|
}
|
|
|
|
/**
|
|
* Set the app
|
|
*
|
|
* @param object $app App
|
|
*/
|
|
public static function set_app($app)
|
|
{
|
|
self::$app = $app;
|
|
}
|
|
}
|