BaseObject moved to Friendica\Core namespace. References and function calls updated.pull/3909/head
@ -1,35 +0,0 @@ | |||
<?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; | |||
} | |||
} |
@ -1,11 +1,15 @@ | |||
<?php | |||
require_once 'boot.php'; | |||
/** | |||
* @file object/TemplateEngine.php | |||
*/ | |||
require_once 'boot.php'; | |||
/** | |||
* Interface for template engines | |||
*/ | |||
interface ITemplateEngine { | |||
public function replace_macros($s,$v); | |||
public function get_template_file($file, $root=''); | |||
interface ITemplateEngine | |||
{ | |||
public function replace_macros($s, $v); | |||
public function get_template_file($file, $root = ''); | |||
} |
@ -0,0 +1,47 @@ | |||
<?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; | |||
} | |||
} |