Switch register_template_engine() to the only one available
- get_declared_classes() can't be used with autoloading - Removed killme() to prevent infinite loop during App object instantiation
This commit is contained in:
parent
f574528338
commit
42c97db724
|
@ -288,12 +288,7 @@ class App
|
||||||
$this->is_friendica_app = ($_SERVER['HTTP_USER_AGENT'] == 'Apache-HttpClient/UNAVAILABLE (java 1.4)');
|
$this->is_friendica_app = ($_SERVER['HTTP_USER_AGENT'] == 'Apache-HttpClient/UNAVAILABLE (java 1.4)');
|
||||||
|
|
||||||
// Register template engines
|
// Register template engines
|
||||||
$dc = get_declared_classes();
|
$this->register_template_engine('Friendica\Render\FriendicaSmartyEngine');
|
||||||
foreach ($dc as $k) {
|
|
||||||
if (in_array('Friendica\Render\ITemplateEngine', class_implements($k))) {
|
|
||||||
$this->register_template_engine($k);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
self::$a = $this;
|
self::$a = $this;
|
||||||
}
|
}
|
||||||
|
@ -602,7 +597,7 @@ class App
|
||||||
$this->template_engines[$name] = $class;
|
$this->template_engines[$name] = $class;
|
||||||
} else {
|
} else {
|
||||||
echo "template engine <tt>$class</tt> cannot be registered without a name.\n";
|
echo "template engine <tt>$class</tt> cannot be registered without a name.\n";
|
||||||
killme();
|
die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue