mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-11-15 04:27:14 +01:00
43 lines
1.0 KiB
PHP
43 lines
1.0 KiB
PHP
|
<?php
|
||
|
|
||
|
namespace Xentral\Modules\DownloadSpooler;
|
||
|
|
||
|
use Xentral\Core\DependencyInjection\ContainerInterface;
|
||
|
|
||
|
final class Bootstrap
|
||
|
{
|
||
|
/**
|
||
|
* @return array
|
||
|
*/
|
||
|
public static function registerServices()
|
||
|
{
|
||
|
return [
|
||
|
'DownloadSpoolerService' => 'onInitDownloadSpoolerService',
|
||
|
'DownloadSpoolerGateway' => 'onInitDownloadSpoolerGateway',
|
||
|
];
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @param ContainerInterface $container
|
||
|
*
|
||
|
* @return DownloadSpoolerService
|
||
|
*/
|
||
|
public static function onInitDownloadSpoolerService(ContainerInterface $container)
|
||
|
{
|
||
|
/** @var \ApplicationCore $app */
|
||
|
$app = $container->get('LegacyApplication');
|
||
|
|
||
|
return new DownloadSpoolerService($container->get('Database'), $app->erp);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @param ContainerInterface $container
|
||
|
*
|
||
|
* @return DownloadSpoolerGateway
|
||
|
*/
|
||
|
public static function onInitDownloadSpoolerGateway(ContainerInterface $container)
|
||
|
{
|
||
|
return new DownloadSpoolerGateway($container->get('Database'));
|
||
|
}
|
||
|
}
|