OpenXE/classes/Modules/PaymentTransaction/Bootstrap.php

32 lines
738 B
PHP
Raw Normal View History

2021-05-21 08:49:41 +02:00
<?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'));
}
}