Total Complexity | 2 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | class ClientFactory extends BaseClientFactory |
||
26 | { |
||
27 | /** @var MessageSerializerInterface[] */ |
||
28 | private $serializers; |
||
29 | |||
30 | public function __construct(SerializerInterface $serializer, LoggerInterface $logger = null) |
||
31 | { |
||
32 | parent::__construct($logger); |
||
33 | |||
34 | $this->serializers = [ |
||
35 | SerializationOptions::OBJECT_SERIALIZER => new JsonObjectSerializer(), |
||
36 | SerializationOptions::ARRAY_SERIALIZER => new JsonArraySerializer(), |
||
37 | SerializationOptions::SYMFONY_SERIALIZER => new SymfonySerializerAdapter($serializer), |
||
38 | ]; |
||
39 | } |
||
40 | |||
41 | protected function createSerializer(string $serializerType): MessageSerializerInterface |
||
44 | } |
||
45 | } |
||
46 |