transport = $transport; $this->endpoints = $endpoints; } /** * @return null|mixed */ public function extractArgument(array &$params, string $arg) { if (array_key_exists($arg, $params) === true) { $val = $params[$arg]; unset($params[$arg]); return $val; } else { return null; } } protected function performRequest(AbstractEndpoint $endpoint) { $response = $this->transport->performRequest( $endpoint->getMethod(), $endpoint->getURI(), $endpoint->getParams(), $endpoint->getBody(), $endpoint->getOptions() ); return $this->transport->resultOrFuture($response, $endpoint->getOptions()); } }