mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 14:36:52 +00:00
update constructor
Signed-off-by: Jean-Yves <7360784+docjyJ@users.noreply.github.com>
This commit is contained in:
parent
69d9c925d0
commit
496ec9ba17
13 changed files with 84 additions and 193 deletions
|
|
@ -9,14 +9,10 @@ use AIO\Docker\DockerActionManager;
|
|||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class ConfigurationController
|
||||
{
|
||||
private ConfigurationManager $configurationManager;
|
||||
|
||||
readonly class ConfigurationController {
|
||||
public function __construct(
|
||||
ConfigurationManager $configurationManager
|
||||
private ConfigurationManager $configurationManager
|
||||
) {
|
||||
$this->configurationManager = $configurationManager;
|
||||
}
|
||||
|
||||
public function SetConfig(Request $request, Response $response, array $args) : Response {
|
||||
|
|
|
|||
|
|
@ -9,21 +9,14 @@ use Psr\Http\Message\ResponseInterface as Response;
|
|||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use AIO\Data\ConfigurationManager;
|
||||
|
||||
class DockerController
|
||||
{
|
||||
private DockerActionManager $dockerActionManager;
|
||||
private ContainerDefinitionFetcher $containerDefinitionFetcher;
|
||||
readonly class DockerController {
|
||||
private const string TOP_CONTAINER = 'nextcloud-aio-apache';
|
||||
private ConfigurationManager $configurationManager;
|
||||
|
||||
public function __construct(
|
||||
DockerActionManager $dockerActionManager,
|
||||
ContainerDefinitionFetcher $containerDefinitionFetcher,
|
||||
ConfigurationManager $configurationManager
|
||||
private DockerActionManager $dockerActionManager,
|
||||
private ContainerDefinitionFetcher $containerDefinitionFetcher,
|
||||
private ConfigurationManager $configurationManager
|
||||
) {
|
||||
$this->dockerActionManager = $dockerActionManager;
|
||||
$this->containerDefinitionFetcher = $containerDefinitionFetcher;
|
||||
$this->configurationManager = $configurationManager;
|
||||
}
|
||||
|
||||
private function PerformRecursiveContainerStart(string $id, bool $pullImage = true) : void {
|
||||
|
|
@ -48,7 +41,7 @@ class DockerController
|
|||
}
|
||||
}
|
||||
|
||||
// Check if docker hub is reachable in order to make sure that we do not try to pull an image if it is down
|
||||
// Check if docker hub is reachable in order to make sure that we do not try to pull an image if it is down
|
||||
// and try to mitigate issues that are arising due to that
|
||||
if ($pullImage) {
|
||||
if (!$this->dockerActionManager->isDockerHubReachable($container)) {
|
||||
|
|
|
|||
|
|
@ -9,14 +9,11 @@ use AIO\Docker\DockerActionManager;
|
|||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class LoginController
|
||||
{
|
||||
private AuthManager $authManager;
|
||||
private DockerActionManager $dockerActionManager;
|
||||
|
||||
public function __construct(AuthManager $authManager, DockerActionManager $dockerActionManager) {
|
||||
$this->authManager = $authManager;
|
||||
$this->dockerActionManager = $dockerActionManager;
|
||||
readonly class LoginController {
|
||||
public function __construct(
|
||||
private AuthManager $authManager,
|
||||
private DockerActionManager $dockerActionManager,
|
||||
) {
|
||||
}
|
||||
|
||||
public function TryLogin(Request $request, Response $response, array $args) : Response {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue