1 | <?php |
||
27 | class ProxyController |
||
28 | { |
||
29 | /** |
||
30 | * @var Proxy |
||
31 | */ |
||
32 | private $proxy; |
||
33 | |||
34 | /** |
||
35 | * @var EngineInterface |
||
36 | */ |
||
37 | private $templating; |
||
38 | |||
39 | /** |
||
40 | * @var ApiDefinitionLoader |
||
41 | */ |
||
42 | private $diactorosFactory; |
||
43 | |||
44 | /** |
||
45 | * @var DiactorosFactory |
||
46 | */ |
||
47 | private $apiLoader; |
||
48 | |||
49 | /** |
||
50 | * @var HttpFoundationFactory |
||
51 | */ |
||
52 | private $httpFoundationFactory; |
||
53 | |||
54 | /** |
||
55 | * @var array |
||
56 | */ |
||
57 | private $proxySourceConfiguration; |
||
58 | |||
59 | /** |
||
60 | * @var TransformationHandler |
||
61 | */ |
||
62 | private $transformationHandler; |
||
63 | |||
64 | /** |
||
65 | * Constructor |
||
66 | * |
||
67 | * @param Proxy $proxy proxy |
||
68 | * @param EngineInterface $templating twig templating engine |
||
69 | * @param ApiDefinitionLoader $loader definition loader |
||
70 | * @param DiactorosFactory $diactorosFactory convert HttpFoundation objects to PSR-7 |
||
71 | * @param HttpFoundationFactory $httpFoundationFactory convert PSR-7 interfaces to HttpFoundation |
||
72 | * @param TransformationHandler $transformationHandler transformation handler |
||
73 | * @param array $proxySourceConfiguration Set of sources to be recognized by the controller. |
||
74 | */ |
||
75 | public function __construct( |
||
92 | |||
93 | /** |
||
94 | * action for routing all requests directly to the third party API |
||
95 | * |
||
96 | * @param Request $request request |
||
97 | * |
||
98 | * @return \Psr\Http\Message\ResponseInterface|Response |
||
99 | */ |
||
100 | public function proxyAction(Request $request) |
||
150 | |||
151 | /** |
||
152 | * get schema info |
||
153 | * |
||
154 | * @param Request $request request |
||
155 | * |
||
156 | * @return Response |
||
157 | */ |
||
158 | public function schemaAction(Request $request) |
||
178 | |||
179 | /** |
||
180 | * get API name and endpoint from the url (third party API) |
||
181 | * |
||
182 | * @param string $url the url |
||
183 | * |
||
184 | * @return array |
||
185 | */ |
||
186 | protected function decideApiAndEndpoint($url) |
||
206 | |||
207 | /** |
||
208 | * Registers configured external services to be proxied. |
||
209 | * |
||
210 | * @return Void |
||
211 | */ |
||
212 | private function registerProxySources() |
||
220 | |||
221 | /** |
||
222 | * get host, scheme and port |
||
223 | */ |
||
224 | private function getHostWithScheme($url) |
||
234 | } |
||
235 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..