OpenXE/classes/Modules/PaymentTransaction/Bootstrap.php
2021-05-21 08:49:41 +02:00

32 lines
738 B
PHP

<?php
declare(strict_types=1);
namespace Xentral\Modules\PaymentTransaction;
use Xentral\Core\DependencyInjection\ContainerInterface;
use Xentral\Modules\PaymentTransaction\Service\PaymentDocumentService;
final class Bootstrap
{
/**
* @return array
*/
public static function registerServices(): array
{
return [
'PaymentDocumentService' => 'onInitPaymentDocumentService',
];
}
/**
* @param ContainerInterface $container
*
* @return PaymentDocumentService
*/
public static function onInitPaymentDocumentService(ContainerInterface $container): PaymentDocumentService
{
return new PaymentDocumentService($container->get('Database'));
}
}