BaseObject moved to Friendica\Core namespace. References and function calls updated.
<?php
-
-
/**
- *
+ * @file index.php
* Friendica
- *
*/
/**
- *
- * bootstrap the application
- *
+ * Bootstrap the application
*/
use Friendica\App;
+use Friendica\Core\BaseObject;
use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Core\Worker;
use Friendica\Database\DBM;
require_once 'boot.php';
-require_once 'object/BaseObject.php';
if (empty($a)) {
$a = new App(__DIR__);
$a->backend = false;
/**
- *
* Load the configuration file which contains our DB credentials.
* Ignore errors. If the file doesn't exist or is empty, we are running in
* installation mode.
- *
*/
$install = ((file_exists('.htconfig.php') && filesize('.htconfig.php')) ? false : true);
+++ /dev/null
-<?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;
- }
-}
<?php
-if(class_exists('Conversation'))
+/**
+ * @file object/Conversation.php
+ */
+if (class_exists('Conversation')) {
return;
+}
+
+use Friendica\Core\BaseObject;
-require_once('boot.php');
-require_once('object/BaseObject.php');
-require_once('object/Item.php');
-require_once('include/text.php');
+require_once 'boot.php';
+require_once 'object/Item.php';
+require_once 'include/text.php';
/**
* A list of threads
<?php
-if(class_exists('Item'))
+/**
+ * @file object/Item.php
+ */
+if (class_exists('Item')) {
return;
+}
+use Friendica\Core\BaseObject;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Database\DBM;
use Friendica\Protocol\Diaspora;
-require_once('object/BaseObject.php');
-require_once('include/text.php');
-require_once('boot.php');
+require_once 'include/text.php';
+require_once 'boot.php';
/**
* An item
<?php\r
-require_once 'boot.php';\r
+/**\r
+ * @file object/TemplateEngine.php\r
+ */\r
\r
+require_once 'boot.php';\r
\r
/**\r
* Interface for template engines\r
*/\r
-interface ITemplateEngine {\r
- public function replace_macros($s,$v);\r
- public function get_template_file($file, $root='');\r
+interface ITemplateEngine\r
+{\r
+ public function replace_macros($s, $v);\r
+ public function get_template_file($file, $root = '');\r
}\r
--- /dev/null
+<?php
+/**
+ * @file src/Core/BaseObject.php
+ */
+namespace Friendica\Core;
+
+if (class_exists('BaseObject')) {
+ return;
+}
+
+require_once 'boot.php';
+
+/**
+ * Basic object
+ *
+ * Contains what is useful 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 = boot::get_app();
+
+ return self::$app;
+ }
+
+ /**
+ * Set the app
+ *
+ * @param object $app App
+ */
+ public static function set_app($app)
+ {
+ self::$app = $app;
+ }
+}