@@ 50-60 (lines=11) @@ | ||
47 | return $container->build(); |
|
48 | } |
|
49 | ||
50 | private static function createTransport( |
|
51 | ContainerInterface $container, |
|
52 | LoopInterface $loop, |
|
53 | array $options = [] |
|
54 | ): TransportClient { |
|
55 | if (!isset($options[Options::TRANSPORT_OPTIONS])) { |
|
56 | throw new InvalidArgumentException('Missing Transport options'); |
|
57 | } |
|
58 | ||
59 | return TransportFactory::create($container, $loop, $options[Options::TRANSPORT_OPTIONS]); |
|
60 | } |
|
61 | ||
62 | private static function createHydrator(ContainerInterface $container, array $options = []) |
|
63 | { |
|
@@ 62-69 (lines=8) @@ | ||
59 | return TransportFactory::create($container, $loop, $options[Options::TRANSPORT_OPTIONS]); |
|
60 | } |
|
61 | ||
62 | private static function createHydrator(ContainerInterface $container, array $options = []) |
|
63 | { |
|
64 | if (!isset($options[Options::HYDRATOR_OPTIONS])) { |
|
65 | throw new InvalidArgumentException('Missing Hydrator options'); |
|
66 | } |
|
67 | ||
68 | return HydratorFactory::create($container, $options[Options::HYDRATOR_OPTIONS]); |
|
69 | } |
|
70 | } |
|
71 |