25 lines
858 B
PHP
25 lines
858 B
PHP
<?php
|
|
use Psr\Container\ContainerInterface as Container;
|
|
|
|
return [
|
|
ProVM\Crypto\Common\Service\API::class => function(Container $container) {
|
|
$filename = implode(DIRECTORY_SEPARATOR, [
|
|
$container->get('locations')->data,
|
|
'api.json'
|
|
]);
|
|
return new ProVM\Crypto\Common\Service\API($filename);
|
|
},
|
|
ProVM\Common\Factory\Model::class => function(Container $container) {
|
|
return new ProVM\Crypto\Common\Factory\Model();
|
|
},
|
|
GuzzleHttp\Client::class => function(Container $container) {
|
|
return new GuzzleHttp\Client(['base_uri' => $container->get('python_api')]);
|
|
},
|
|
ProVM\Crypto\Common\Service\Update::class => function(Container $container) {
|
|
return new ProVM\Crypto\Common\Service\Update(
|
|
$container->get(ProVM\Crypto\Common\Factory\Model::class),
|
|
$container->get(GuzzleHttp\Client::class)
|
|
);
|
|
}
|
|
];
|