2012-08-10 13:57:39 -04:00
|
|
|
<?php
|
2017-01-27 05:53:56 -05:00
|
|
|
if (class_exists('BaseObject')) {
|
2012-08-10 13:57:39 -04:00
|
|
|
return;
|
2017-01-27 05:53:56 -05:00
|
|
|
}
|
2012-08-10 13:57:39 -04:00
|
|
|
|
|
|
|
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() {
|
2017-01-27 05:53:56 -05:00
|
|
|
if (self::$app) {
|
2012-08-10 13:57:39 -04:00
|
|
|
return self::$app;
|
2017-01-27 05:53:56 -05:00
|
|
|
}
|
2012-08-10 13:57:39 -04:00
|
|
|
|
2016-12-13 04:16:36 -05:00
|
|
|
self::$app = get_app();
|
2012-08-10 13:57:39 -04:00
|
|
|
|
|
|
|
return self::$app;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the app
|
|
|
|
*/
|
|
|
|
public static function set_app($app) {
|
|
|
|
self::$app = $app;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|