OpenXE/classes/Modules/PaymentMethod/Bootstrap.php

32 lines
714 B
PHP
Raw Normal View History

2021-05-21 08:49:41 +02:00
<?php
declare(strict_types=1);
namespace Xentral\Modules\PaymentMethod;
use Xentral\Core\DependencyInjection\ContainerInterface;
use Xentral\Modules\PaymentMethod\Service\PaymentMethodService;
final class Bootstrap
{
/**
* @return array
*/
public static function registerServices(): array
{
return [
'PaymentMethodService' => 'onInitPaymentMethodService',
];
}
/**
* @param ContainerInterface $container
*
* @return PaymentMethodService
*/
public static function onInitPaymentMethodService(ContainerInterface $container): PaymentMethodService
{
return new PaymentMethodService($container->get('Database'));
}
}