Acacha\Llum\Console\ConsoleCommand::argument PHP Method

argument() public method

Set/get argument.
public argument ( array | null $argument = null ) : ConsoleCommand | string
$argument array | null
return ConsoleCommand | string | string
    public function argument($argument = null)
    {
        return $this->getterSetter('argument', $argument);
    }

Usage Example

Esempio n. 1
0
 /**
  * Configure the command options.
  */
 protected function configure()
 {
     $command = new ConsoleCommand();
     $command->name($this->commandName)->description($this->commandDescription);
     if ($this->argument != null) {
         $command->argument(['name' => $this->argument, 'description' => $this->argumentDescription, 'type' => $this->argumentType]);
     }
     $this->configureCommand($command);
 }