aboutsummaryrefslogtreecommitdiffstats
path: root/include/BaseObject.php
blob: 200831e15dbd7f48105f04af1c91160aca0d8c0c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?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;

		global $a;
		self::$app = $a;

		return self::$app;
	}

	/**
	 * Set the app
	 */
	public static function set_app($app) {
		self::$app = $app;
	}
}