1 | <?php |
||
29 | final class GetController |
||
30 | { |
||
31 | private $format; |
||
32 | private $serializer; |
||
33 | private $gateways; |
||
34 | private $headerBuilder; |
||
35 | |||
36 | 2 | public function __construct( |
|
37 | Format $format, |
||
38 | SerializerInterface $serializer, |
||
39 | MapInterface $gateways, |
||
40 | GetBuilderInterface $headerBuilder |
||
41 | ) { |
||
42 | if ( |
||
43 | 2 | (string) $gateways->keyType() !== 'string' || |
|
44 | 2 | (string) $gateways->valueType() !== GatewayInterface::class |
|
45 | ) { |
||
46 | 1 | throw new InvalidArgumentException; |
|
47 | } |
||
48 | |||
49 | 1 | $this->format = $format; |
|
50 | 1 | $this->serializer = $serializer; |
|
51 | 1 | $this->gateways = $gateways; |
|
52 | 1 | $this->headerBuilder = $headerBuilder; |
|
53 | 1 | } |
|
54 | |||
55 | 1 | public function defaultAction(Request $request, $identity): ResponseInterface |
|
94 | } |
||
95 |