Moosh\MooshCommand::addArgument PHP Method

addArgument() public method

Define required argument. Call function again to add another argument.
public addArgument ( string $name, $type = ARG_GENERIC )
$name string
    public function addArgument($name, $type = ARG_GENERIC)
    {
        $this->minArguments++;
        $this->maxArguments++;
        $this->argumentNames[] = $name;
        if ($type == ARG_EXISTING_FILENAME) {
            if ($name[0] != '/') {
                $name = $this->cwd . DIRECTORY_SEPARATOR . $name;
            }
            if (!file_exists($name)) {
                cli_error("Input file '" . $name . "' does not exist.");
            }
            if (!is_readable($name)) {
                cli_error("Input file '" . $name . "' is not readable.");
            }
        }
    }