getArgument() public method

Gets the argument of the command at the specified index.
public getArgument ( integer $index ) : mixed | null
$index integer Index of the desired argument.
return mixed | null
Exemplo n.º 1
0
 private function storeDebug(CommandInterface $command, $direction)
 {
     $firtsArg = $command->getArgument(0);
     $timestamp = round(microtime(true) - $this->tstart, 4);
     $debug = $command->getId();
     $debug .= isset($firtsArg) ? " {$firtsArg} " : ' ';
     $debug .= "{$direction} {$this}";
     $debug .= " [{$timestamp}s]";
     $this->debugBuffer[] = $debug;
 }
Exemplo n.º 2
0
 /**
  * Extracts the key from the first argument of a command instance.
  *
  * @param CommandInterface $command Command instance.
  * @return string
  */
 protected function getKeyFromFirstArgument(CommandInterface $command)
 {
     return $command->getArgument(0);
 }