Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Moved more services to `::class identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Speckmaier committed Nov 24, 2017
1 parent f4e00c5 commit c936747
Showing 1 changed file with 29 additions and 6 deletions.
35 changes: 29 additions & 6 deletions app/container.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,14 @@
return new \Rancherize\Blueprint\Infrastructure\Volume\VolumeWriter($c[\Rancherize\File\FileLoader::class]);
};

$container['infrastructure-writer'] = function($c) {
$container[\Rancherize\Blueprint\Infrastructure\InfrastructureWriter::class] = function($c) {
return new \Rancherize\Blueprint\Infrastructure\InfrastructureWriter($c['dockerfile-writer'], $c['service-writer'], $c['volume-writer']);
};

$container['infrastructure-writer'] = function($c) {
return $c[\Rancherize\Blueprint\Infrastructure\InfrastructureWriter::class];
};

$container['build-service'] = function($c) {
return new \Rancherize\Services\BuildService($c['validate-service'], $c['infrastructure-writer'], $c['event']);
};
Expand Down Expand Up @@ -148,26 +152,45 @@
return new \Rancherize\Blueprint\Validation\Validator($c['blueprint-rule-factory']);
};

$container['docker-compose-reader'] = function() {
$container[\Rancherize\Docker\DockerComposeReader\DockerComposeReader::class] = function($c) {
return new Rancherize\Docker\DockerComposeReader\DockerComposeReader();
};

$container['rancher-compose-reader'] = function() {
$container['docker-compose-reader'] = function($c) {
return $c[\Rancherize\Docker\DockerComposeReader\DockerComposeReader::class];
};

$container[\Rancherize\Docker\RancherComposeReader\RancherComposeReader::class] = function() {
return new Rancherize\Docker\RancherComposeReader\RancherComposeReader();
};

$container['docker-compose-versionizer'] = function() {
$container['rancher-compose-reader'] = function($c) {
return $c[\Rancherize\Docker\RancherComposeReader\RancherComposeReader::class];
};

$container[\Rancherize\Docker\DockerComposerVersionizer::class] = function() {
return new \Rancherize\Docker\DockerComposerVersionizer();
};

$container['by-key-service'] = function() {
$container['docker-compose-versionizer'] = function($c) {
return $c[\Rancherize\Docker\DockerComposerVersionizer::class];
};

$container[\Rancherize\General\Services\ByKeyService::class] = function() {
return new \Rancherize\General\Services\ByKeyService();
};

$container['name-is-path-checker'] = function() {
$container['by-key-service'] = function($c) {
return $c[\Rancherize\General\Services\ByKeyService::class];
};

$container[\Rancherize\General\Services\NameIsPathChecker::class] = function() {
return new \Rancherize\General\Services\NameIsPathChecker();
};

$container['name-is-path-checker'] = function($c) {
return $c[\Rancherize\General\Services\NameIsPathChecker::class];
};
$pluginProvider = new \Rancherize\Plugin\PluginProvider();
$pluginProvider->setContainer($container);
$pluginProvider->register();
Expand Down

0 comments on commit c936747

Please sign in to comment.