public function getCommandInputArguments(StorkCommandInstance $commandInstance = NULL) { if ($commandInstance == NULL) { throw new \Exception("Cannot create an InputArgument object from NULL command instance"); } $this->arguments = array(); $commandArguments = $commandInstance->getArguments(); foreach ($commandArguments as $argument) { if (!empty($argument)) { $this->parseArgument($argument); } } if (count($this->arguments) == 0) { $this->arguments['command'] = $commandInstance->getCommand(); } return new ArrayInput($this->arguments); }
public function getHashCommand(StorkCommandInstance $commandInstance, $queueId) { return sha1($commandInstance->getCommand() . implode('', $commandInstance->getArguments()) . $queueId); }