private function catchShortcut($name, $task) { $size = strlen($name); for ($i = 0; $i < $size; ++$i) { if ($this->tasks[$task]->shortcutExists($name[$i])) { $this->tasks[$task]->getOptionFromShortcut($name[$i])->setValue(true); } else { TaskErrors::shortcutNotExists($task, $name[$i]); } } }
public function setArgumentsValue($value) { if ($this->hasArgument() && !$this->getCurrentArgument()->hasValue()) { $Arg = $this->getCurrentArgument(); } else { if (($Arg = $this->getNextArgument()) === false) { TaskErrors::tooManyArguments($this->getNumberOfArguments()); } } $Arg->setValue($value); $name = $Arg->getName(); if (isset($this->requiredArguments[$name])) { unset($this->requiredArguments[$name]); } }