Deployer\Console\Application::addUserArgumentsAndOptions PHP Method

addUserArgumentsAndOptions() public method

Add user definition arguments and options to definition.
    public function addUserArgumentsAndOptions()
    {
        $this->getDefinition()->addArguments($this->getUserDefinition()->getArguments());
        $this->getDefinition()->addOptions($this->getUserDefinition()->getOptions());
    }

Usage Example

Example #1
0
 /**
  * Transform tasks to console commands.
  */
 public function addConsoleCommands()
 {
     $this->console->addUserArgumentsAndOptions();
     foreach ($this->tasks as $name => $task) {
         if ($task->isPrivate()) {
             continue;
         }
         $this->console->add(new TaskCommand($name, $task->getDescription(), $this));
     }
 }