diff options
author | zotlabs <mike@macgirvin.com> | 2016-10-19 16:31:35 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2016-10-19 16:31:35 -0700 |
commit | c79c1b391331ab7c8c0f01265a627ffae23d54e2 (patch) | |
tree | 66d988e77e1af2b8695a9726a76fc7d5743a69a6 /boot.php | |
parent | 716a83d1f77e2d6f26b25ab03ffe130c11ef7feb (diff) | |
parent | b926a4c67e4d7dcba01df91dddcc047abde246bb (diff) | |
download | volse-hubzilla-c79c1b391331ab7c8c0f01265a627ffae23d54e2.tar.gz volse-hubzilla-c79c1b391331ab7c8c0f01265a627ffae23d54e2.tar.bz2 volse-hubzilla-c79c1b391331ab7c8c0f01265a627ffae23d54e2.zip |
Merge branch 'dev' into pdo
Diffstat (limited to 'boot.php')
-rwxr-xr-x | boot.php | 48 |
1 files changed, 9 insertions, 39 deletions
@@ -27,6 +27,9 @@ * documented. */ +// composer autoloader for all namespaced Classes +require_once('vendor/autoload.php'); + require_once('include/config.php'); require_once('include/network.php'); require_once('include/plugin.php'); @@ -695,44 +698,14 @@ function startup() { } -class ZotlabsAutoloader { - static public function loader($className) { - $debug = false; - $filename = str_replace('\\', '/', $className) . ".php"; - if(file_exists($filename)) { - include($filename); - if (class_exists($className)) { - return TRUE; - } - } - $arr = explode('\\',$className); - if($arr && count($arr) > 1) { - if(! $arr[0]) - $arr = array_shift($arr); - $filename = 'addon/' . lcfirst($arr[0]) . '/' . $arr[1] . ((count($arr) === 2) ? '.php' : '/' . $arr[2] . ".php"); - if(file_exists($filename)) { - include($filename); - if (class_exists($className)) { - return TRUE; - } - } - } - - return FALSE; - } -} - - /** * class miniApp * * this is a transient structure which is needed to convert the $a->config settings * from older (existing) htconfig files which used a global App ($a) into the updated App structure - * which is now static (although currently constructed at startup). We are only converting - * 'system' config settings. + * which is now static (although currently constructed at startup). We are only converting + * 'system' config settings. */ - - class miniApp { public $config = array('system' => array()); @@ -982,24 +955,21 @@ class App { * register template engines */ - spl_autoload_register('ZotlabsAutoloader::loader'); - self::$meta= new Zotlabs\Web\HttpMeta(); // create an instance of the smarty template engine so we can register it. $smarty = new Zotlabs\Render\SmartyTemplate(); - + /// @todo validate if this is still the desired behavior + self::register_template_engine(get_class($smarty)); +/* $dc = get_declared_classes(); - foreach ($dc as $k) { if(in_array('Zotlabs\\Render\\TemplateEngine', class_implements($k))) { self::register_template_engine($k); } } - - - +*/ } public static function get_baseurl($ssl = false) { |