chore: Refactoring of Bootstrap class into an abstract class.

This allows to implement bootstrap classes for each module and simplifies the bootstrap code.

Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
Rubén D
2022-05-16 19:01:28 +02:00
parent fe349cb6f9
commit 98ffc311cf
32 changed files with 1024 additions and 844 deletions

View File

@@ -27,8 +27,8 @@ namespace SP\Modules\Web;
use Defuse\Crypto\Exception\CryptoException;
use Exception;
use Klein\Klein;
use SP\Bootstrap;
use SP\Core\Application;
use SP\Core\Bootstrap\BootstrapBase;
use SP\Core\Context\ContextBase;
use SP\Core\Context\SessionContext;
use SP\Core\Crypt\CryptSessionHandler;
@@ -271,7 +271,7 @@ final class Init extends HttpModuleBase
private function initSession(bool $encrypt = false): void
{
if ($encrypt === true
&& Bootstrap::$checkPhpVersion
&& BootstrapBase::$checkPhpVersion
&& ($key = $this->secureSessionService->getKey(UUIDCookie::factory($this->request))) !== false) {
session_set_save_handler(new CryptSessionHandler($key), true);
}