friendica_2021.01_tupambae_.../object/BaseObject.php

36 lines
469 B
PHP
Raw Normal View History

2012-08-10 19:57:39 +02:00
<?php
if(class_exists('BaseObject'))
2012-08-10 19:57:39 +02:00
return;
require_once('boot.php');
/**
* Basic object
*
* Contains what is usefull to any object
*/
class BaseObject {
private static $app = null;
/**
* Get the app
2017-04-30 06:21:02 +02:00
*
2012-08-10 19:57:39 +02:00
* Same as get_app from boot.php
*/
public function get_app() {
if(self::$app)
2012-08-10 19:57:39 +02:00
return self::$app;
self::$app = get_app();
2012-08-10 19:57:39 +02:00
return self::$app;
}
/**
* Set the app
*/
public static function set_app($app) {
self::$app = $app;
}
}