mirror of
https://github.com/friendica/friendica
synced 2025-04-24 10:30:11 +00:00
Move Item and Conversation from Core to Object
- Move BaseObject from Core\ to Friendica\
This commit is contained in:
parent
1f38deb77b
commit
f43aaf5227
5 changed files with 23 additions and 23 deletions
47
src/BaseObject.php
Normal file
47
src/BaseObject.php
Normal file
|
@ -0,0 +1,47 @@
|
|||
<?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 object
|
||||
*/
|
||||
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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue