Introduce DICE
- Adding dice library - Adding dependency config - Removing Factories - Refactoring App\Mode constructor - Refactoring App\Router constructor - Refactoring BasePath for DI usage - Refactoring ConfigFileLoader constructor - Refactoring Profiler constructor - Adjust entrypoints (index, console, worker, ..) - Adding functional test for DI - Fix tests because of refactorings
This commit is contained in:
parent
5887b9c499
commit
55999730e0
28 changed files with 563 additions and 308 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace Friendica\Core\L10n;
|
||||
|
||||
use Friendica\Core\Config\Configuration;
|
||||
use Friendica\Core\Hook;
|
||||
use Friendica\Core\Session;
|
||||
use Friendica\Database\Database;
|
||||
|
@ -52,12 +53,12 @@ class L10n
|
|||
*/
|
||||
private $logger;
|
||||
|
||||
public function __construct(string $lang, Database $dba, LoggerInterface $logger)
|
||||
public function __construct(Configuration $config, Database $dba, LoggerInterface $logger)
|
||||
{
|
||||
$this->dba = $dba;
|
||||
$this->logger = $logger;
|
||||
|
||||
$this->loadTranslationTable($lang);
|
||||
$this->loadTranslationTable(L10n::detectLanguage($config->get('system', 'language', 'en')));
|
||||
|
||||
\Friendica\Core\L10n::init($this);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue