public function visit(CommandInterface $command, RequestInterface $request, Parameter $param, $value) { $this->fqname = $command->getName(); $query = array(); $this->customResolver($value, $param, $query, $param->getWireName()); $request->addPostFields($query); }
public function getClassName(CommandInterface $command) { $className = $command->getName(); if (isset($this->map[$className])) { return $this->map[$className]; } elseif (isset($this->map['*'])) { // If a wildcard was added, then always use that return $this->map['*']; } return null; }
protected function getClassName(CommandInterface $command) { $iteratorName = $this->inflector->camel($command->getName()) . 'Iterator'; // Determine the name of the class to load foreach ($this->namespaces as $namespace) { $potentialClassName = $namespace . '\\' . $iteratorName; if (class_exists($potentialClassName)) { return $potentialClassName; } } return false; }
public function build(CommandInterface $command, array $options = array()) { // Get the configuration data for the command $commandName = $command->getName(); $commandSupported = isset($this->config[$commandName]); $options = $this->translateLegacyConfigOptions($options); $options += $commandSupported ? $this->config[$commandName] : array(); // Instantiate the iterator using the primary factory (if one was provided) if ($this->primaryIteratorFactory && $this->primaryIteratorFactory->canBuild($command)) { $iterator = $this->primaryIteratorFactory->build($command, $options); } elseif (!$commandSupported) { throw new InvalidArgumentException("Iterator was not found for {$commandName}."); } else { // Instantiate a generic AWS resource iterator $iterator = new AwsResourceIterator($command, $options); } return $iterator; }