aboutsummaryrefslogtreecommitdiffstats
path: root/object/BaseObject.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-09-10 22:00:56 -0700
committerfriendica <info@friendica.com>2012-09-10 22:00:56 -0700
commitc8957b36ea11a41604330c8f87c0fc0611ef18e6 (patch)
tree4a1b2ae68d463a69c388fa6ee0a7453cc8e74498 /object/BaseObject.php
parent61cca7637af3c4484d90ed9e1208a10845758276 (diff)
downloadvolse-hubzilla-c8957b36ea11a41604330c8f87c0fc0611ef18e6.tar.gz
volse-hubzilla-c8957b36ea11a41604330c8f87c0fc0611ef18e6.tar.bz2
volse-hubzilla-c8957b36ea11a41604330c8f87c0fc0611ef18e6.zip
permissions responder + upstream merge
Diffstat (limited to 'object/BaseObject.php')
-rw-r--r--object/BaseObject.php37
1 files changed, 37 insertions, 0 deletions
diff --git a/object/BaseObject.php b/object/BaseObject.php
new file mode 100644
index 000000000..14f0d8fd0
--- /dev/null
+++ b/object/BaseObject.php
@@ -0,0 +1,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;
+ }
+}
+?>