/** * Create a request for an operation with a uri merged onto a base URI */ private function createCommandWithUri(GuzzleCommandInterface $command, GuzzleClientInterface $client) { // Get the path values and use the client config settings $variables = array(); $operation = $command->getOperation(); foreach ($operation->getParams() as $name => $arg) { /* @var Parameter $arg */ if ($arg->getLocation() == 'uri') { if (isset($command[$name])) { $variables[$name] = $arg->filter($command[$name]); if (!is_array($variables[$name])) { $variables[$name] = (string) $variables[$name]; } } } } return $client->getHttpClient()->createRequest($operation->getHttpMethod(), array($client->getDescription()->getBaseUrl()->combine($operation->getUri()), $variables), $command['request_options'] ?: array()); }
private function visitWithValue($value, Parameter $param, GuzzleCommandInterface $command) { if (!$this->writer) { $this->createRootElement($command->getOperation()); } $this->addXml($this->writer, $param, $value); }