mirror of
https://github.com/nuxsmin/sysPass.git
synced 2026-03-03 07:04:07 +01:00
chore: Use Application helper class and externalize UpgradeConfigChecker.
Signed-off-by: Rubén D <nuxsmin@syspass.org>
This commit is contained in:
@@ -29,6 +29,7 @@ use Psr\Container\ContainerInterface;
|
||||
use SP\Config\Config;
|
||||
use SP\Core\Acl\Acl;
|
||||
use SP\Core\Acl\UnauthorizedPageException;
|
||||
use SP\Core\Application;
|
||||
use SP\Core\Bootstrap\BootstrapBase;
|
||||
use SP\Core\Context\ContextInterface;
|
||||
use SP\Core\Events\EventDispatcher;
|
||||
@@ -65,9 +66,7 @@ abstract class SimpleControllerBase
|
||||
* @throws \JsonException
|
||||
*/
|
||||
public function __construct(
|
||||
EventDispatcher $eventDispatcher,
|
||||
Config $config,
|
||||
ContextInterface $session,
|
||||
Application $application,
|
||||
ThemeInterface $theme,
|
||||
Klein $router,
|
||||
Acl $acl,
|
||||
@@ -78,10 +77,10 @@ abstract class SimpleControllerBase
|
||||
$this->dic = BootstrapBase::getContainer();
|
||||
|
||||
$this->controllerName = $this->getControllerName();
|
||||
$this->configData = $config->getConfigData();
|
||||
$this->eventDispatcher = $eventDispatcher;
|
||||
$this->config = $config;
|
||||
$this->session = $session;
|
||||
$this->config = $application->getConfig();
|
||||
$this->configData = $this->config->getConfigData();
|
||||
$this->eventDispatcher = $application->getEventDispatcher();
|
||||
$this->session = $application->getContext();
|
||||
$this->theme = $theme;
|
||||
$this->router = $router;
|
||||
$this->acl = $acl;
|
||||
@@ -106,8 +105,6 @@ abstract class SimpleControllerBase
|
||||
}
|
||||
}
|
||||
|
||||
abstract protected function initialize(): void;
|
||||
|
||||
/**
|
||||
* Comprobaciones
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user