Add Session Management instances (including Depenency Injection)

- Prerequesite for mocking Sessions
- Reduce "App" class complexity
This commit is contained in:
Philipp Holzer 2019-12-10 00:44:56 +01:00
commit 555513e4b4
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
10 changed files with 408 additions and 143 deletions

View file

@ -670,15 +670,11 @@ class App
System::externalRedirect($this->baseURL->get() . '/' . $this->args->getQueryString());
}
Core\Session::init();
Core\Hook::callAll('init_1');
}
// Exclude the backend processes from the session management
if (!$this->mode->isBackend()) {
$stamp1 = microtime(true);
session_start();
$this->profiler->saveTimestamp($stamp1, 'parser', Core\System::callstack());
$this->l10n->setSessionVariable();
$this->l10n->setLangFromSession();
} else {