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.");
}
}
}