mirror of
https://github.com/friendica/friendica
synced 2025-01-19 14:59:46 +00:00
Move registerTemplateEngine() into App class
This commit is contained in:
parent
768d7961a6
commit
04fb9dd9e0
3 changed files with 6 additions and 14 deletions
|
@ -175,6 +175,8 @@ class App
|
|||
{
|
||||
$this->setupContainerForAddons();
|
||||
|
||||
$this->registerTemplateEngine();
|
||||
|
||||
(\Friendica\Core\Console::create($this->container, $argv))->execute();
|
||||
}
|
||||
|
||||
|
@ -184,6 +186,8 @@ class App
|
|||
|
||||
$this->container->setup(LogChannel::AUTH_JABBERED, false);
|
||||
|
||||
$this->registerTemplateEngine();
|
||||
|
||||
/** @var BasePath */
|
||||
$basePath = $this->container->create(BasePath::class);
|
||||
|
||||
|
|
|
@ -22,11 +22,10 @@ interface Container
|
|||
* @deprecated
|
||||
*
|
||||
* @param string $logChannel The Log Channel of this call
|
||||
* @param bool $withTemplateEngine true, if the template engine should be set too
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setup(string $logChannel = LogChannel::DEFAULT, bool $withTemplateEngine = true): void;
|
||||
public function setup(string $logChannel = LogChannel::DEFAULT): void;
|
||||
|
||||
/**
|
||||
* Returns a fully constructed object based on $name using $args and $share as constructor arguments if supplied
|
||||
|
|
|
@ -10,7 +10,6 @@ declare(strict_types=1);
|
|||
namespace Friendica\Core;
|
||||
|
||||
use Dice\Dice;
|
||||
use Friendica\Core\Addon\Capability\ICanLoadAddons;
|
||||
use Friendica\Core\Logger\Capability\LogChannel;
|
||||
use Friendica\Core\Logger\Handler\ErrorHandler;
|
||||
use Friendica\DI;
|
||||
|
@ -43,19 +42,14 @@ final class DiceContainer implements Container
|
|||
* @deprecated
|
||||
*
|
||||
* @param string $logChannel The Log Channel of this call
|
||||
* @param bool $withTemplateEngine true, if the template engine should be set too
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setup(string $logChannel = LogChannel::DEFAULT, bool $withTemplateEngine = true): void
|
||||
public function setup(string $logChannel = LogChannel::DEFAULT): void
|
||||
{
|
||||
$this->setupContainerForLogger($logChannel);
|
||||
$this->setupLegacyServiceLocator();
|
||||
$this->registerErrorHandler();
|
||||
|
||||
if ($withTemplateEngine) {
|
||||
$this->registerTemplateEngine();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -100,9 +94,4 @@ final class DiceContainer implements Container
|
|||
{
|
||||
ErrorHandler::register($this->container->create(LoggerInterface::class));
|
||||
}
|
||||
|
||||
private function registerTemplateEngine(): void
|
||||
{
|
||||
Renderer::registerTemplateEngine('Friendica\Render\FriendicaSmartyEngine');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue