]> git.mxchange.org Git - friendica.git/blob - src/Core/BaseObject.php
Remove condition
[friendica.git] / src / Core / BaseObject.php
1 <?php
2 /**
3  * @file src/Core/BaseObject.php
4  */
5 namespace Friendica\Core;
6
7 require_once 'boot.php';
8
9 /**
10  * Basic object
11  *
12  * Contains what is useful to any object
13  */
14 class BaseObject
15 {
16         private static $app = null;
17
18         /**
19          * Get the app
20          *
21          * Same as get_app from boot.php
22          */
23         public function get_app()
24         {
25                 if (self::$app) {
26                         return self::$app;
27                 }
28
29                 self::$app = boot::get_app();
30
31                 return self::$app;
32         }
33
34         /**
35          * Set the app
36          *
37          * @param object $app App
38          */
39         public static function set_app($app)
40         {
41                 self::$app = $app;
42         }
43 }