mirror of
https://github.com/friendica/friendica
synced 2025-01-08 18:44:43 +00:00
Refactor registering template engine
This commit is contained in:
parent
e9b92aea7b
commit
a6385bed71
1 changed files with 9 additions and 3 deletions
12
src/App.php
12
src/App.php
|
@ -17,6 +17,7 @@ use Friendica\App\Router;
|
|||
use Friendica\Capabilities\ICanCreateResponses;
|
||||
use Friendica\Content\Nav;
|
||||
use Friendica\Core\Config\Factory\Config;
|
||||
use Friendica\Core\Renderer;
|
||||
use Friendica\Core\Session\Capability\IHandleUserSessions;
|
||||
use Friendica\Database\Definition\DbaDefinition;
|
||||
use Friendica\Database\Definition\ViewDefinition;
|
||||
|
@ -200,7 +201,7 @@ class App
|
|||
|
||||
$this->registerErrorHandler();
|
||||
|
||||
Core\Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
|
||||
$this->registerTemplateEngine();
|
||||
|
||||
(new \Friendica\Core\Console($this->container, $argv))->execute();
|
||||
}
|
||||
|
@ -230,6 +231,11 @@ class App
|
|||
\Friendica\Core\Logger\Handler\ErrorHandler::register($this->container->create(LoggerInterface::class));
|
||||
}
|
||||
|
||||
private function registerTemplateEngine(): void
|
||||
{
|
||||
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
|
||||
}
|
||||
|
||||
/**
|
||||
* Load the whole app instance
|
||||
*/
|
||||
|
@ -264,8 +270,8 @@ class App
|
|||
}
|
||||
|
||||
$this->loadDefaultTimezone();
|
||||
// Register template engines
|
||||
Core\Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
|
||||
|
||||
$this->registerTemplateEngine();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue