mirror of
https://github.com/friendica/friendica
synced 2024-12-23 23:20:16 +00:00
293436e5fd
- max_proccesses_reach() and maxload_reached() (why no _ behind max?) are called both way, static and with object reference. - this is strongly discouraged and should be avoided as its support (in PHP) may be dropped in future releases. - used $a = get_app(); to encapsulate code (even when the function does currently the same, it may be changed later) Signed-off-by: Roland Häder <roland@mxchange.org>
36 lines
473 B
PHP
36 lines
473 B
PHP
<?php
|
|
if(class_exists('BaseObject'))
|
|
return;
|
|
|
|
require_once('boot.php');
|
|
|
|
/**
|
|
* Basic object
|
|
*
|
|
* Contains what is usefull 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 = get_app();
|
|
|
|
return self::$app;
|
|
}
|
|
|
|
/**
|
|
* Set the app
|
|
*/
|
|
public static function set_app($app) {
|
|
self::$app = $app;
|
|
}
|
|
}
|
|
?>
|