* SZEP card poller implementation added
* new tags for sms parsing
This commit is contained in:
33
src/App/Service/SZEPManagerServiceFactory.php
Normal file
33
src/App/Service/SZEPManagerServiceFactory.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Service;
|
||||
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use GuzzleHttp\Client;
|
||||
use Interop\Container\ContainerInterface;
|
||||
|
||||
class SZEPManagerServiceFactory
|
||||
{
|
||||
|
||||
/**
|
||||
* @param ContainerInterface $container
|
||||
* @return SZEPManagerService
|
||||
* @throws \Psr\Container\ContainerExceptionInterface
|
||||
* @throws \Psr\Container\NotFoundExceptionInterface
|
||||
*/
|
||||
public function __invoke(ContainerInterface $container)
|
||||
{
|
||||
$httpClient = new Client([
|
||||
'cookies' => true,
|
||||
'headers' => [
|
||||
'Content-Type' => 'text/xml; charset=UTF-8',
|
||||
]
|
||||
]);
|
||||
$config = $container->get('config');
|
||||
/** @var EntityManager $em */
|
||||
$em = $container->get('doctrine.entity_manager.orm_default');
|
||||
/** @var KoinService $koinService */
|
||||
$koinService = $container->get(KoinService::class);
|
||||
return new SZEPManagerService($httpClient, $config, $em, $koinService);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user