1 | <?php |
||
41 | class RestApiClient implements SingletonInterface |
||
42 | { |
||
43 | /** |
||
44 | * @var Typo3Cache |
||
45 | */ |
||
46 | private $typo3Cache; |
||
47 | /** |
||
48 | * @var ExtensionConfiguration |
||
49 | */ |
||
50 | private $extensionConfiguration; |
||
51 | /** |
||
52 | * @var boolean |
||
53 | */ |
||
54 | private $isExecutingRequest = false; |
||
55 | /** |
||
56 | * @var boolean |
||
57 | */ |
||
58 | private $isRequestPrepared = false; |
||
59 | /** |
||
60 | * @var RestApiRequestScope |
||
61 | */ |
||
62 | private $restApiRequestScope; |
||
63 | |||
64 | /** |
||
65 | * @param ExtensionConfiguration $extensionConfiguration |
||
66 | * @param RestApiRequestScope $restApiRequestScope |
||
67 | * @param Typo3Cache $typo3Cache |
||
68 | */ |
||
69 | 5 | public function __construct( |
|
70 | ExtensionConfiguration $extensionConfiguration, |
||
71 | RestApiRequestScope $restApiRequestScope, |
||
72 | Typo3Cache $typo3Cache |
||
73 | ) { |
||
74 | 5 | $this->extensionConfiguration = $extensionConfiguration; |
|
75 | 5 | $this->restApiRequestScope = $restApiRequestScope; |
|
76 | 5 | $this->typo3Cache = $typo3Cache; |
|
77 | 5 | } |
|
78 | |||
79 | /** |
||
80 | * @return boolean |
||
81 | */ |
||
82 | 1 | public function isExecutingRequest() |
|
83 | { |
||
84 | 1 | return $this->isExecutingRequest; |
|
85 | } |
||
86 | |||
87 | /** |
||
88 | * @return boolean |
||
89 | */ |
||
90 | 2 | public function isProductionContextSet() |
|
91 | { |
||
92 | 2 | return $this->extensionConfiguration->isProductionContextSet(); |
|
93 | } |
||
94 | |||
95 | /** |
||
96 | * @param string $requestMethod e.g. 'GET', 'POST', 'PUT' or 'DELETE' |
||
97 | * @param string $requestUri e.g. '/api/products/320' (without GET-params) |
||
98 | * @param array|stdClass $getData |
||
99 | * @param array|stdClass $postData |
||
100 | * @return mixed can be a primitive or array or object |
||
101 | * @throws RestApiRequestException |
||
102 | */ |
||
103 | 3 | public function executeRequest($requestMethod, $requestUri, $getData = null, $postData = null) |
|
120 | |||
121 | /** |
||
122 | * We must create for every REST-API-request a new object, because the object will contain data, which is related to the request |
||
123 | * |
||
124 | * @return RestApiRequest |
||
125 | */ |
||
126 | protected function createRequest() |
||
130 | |||
131 | /** |
||
132 | * @param RestException $e |
||
133 | * @param string $requestMethod |
||
134 | * @param string $requestUri |
||
135 | * @return RestApiRequestException |
||
136 | */ |
||
137 | 1 | protected function createRequestException(RestException $e, $requestMethod, $requestUri) |
|
149 | |||
150 | /** |
||
151 | * @return RestlerBuilder |
||
152 | */ |
||
153 | protected function getRestlerBuilder() |
||
158 | |||
159 | /** |
||
160 | * We must prepare the REST-API-request when we are in the 'normal' TYPO3-context (the client, which called this PHP-request, has |
||
161 | * NOT requested an REST-API-endpoint). In this case, we must build the 'original' REST-API-Request (aka Restler-object, which is |
||
162 | * always required), before we can execute any REST-API-request via this PHP-client. |
||
163 | * |
||
164 | * @return boolean |
||
165 | */ |
||
166 | protected function isRequestPreparationRequired() |
||
173 | |||
174 | /** |
||
175 | * build the 'original' REST-API-Request (aka Restler-object, which is always |
||
176 | * required) and store it in the REST-API-Request-Scope (aka Scope-object) |
||
177 | */ |
||
178 | 1 | private function prepareRequest() |
|
184 | } |
||
185 |
Scrutinizer analyzes your
composer.json
/composer.lock
file if available to determine the classes, and functions that are defined by your dependencies.It seems like the listed class was neither found in your dependencies, nor was it found in the analyzed files in your repository. If you are using some other form of dependency management, you might want to disable this analysis.