public function registerArgument($arg, $help, $required = true, $command = '')
    {
        if (!isset($this->setup[$command])) {
            throw new Exception("Command $command not registered");
        }

        $this->setup[$command]['args'][] = array(
            'name' => $arg,
            'help' => $help,
            'required' => $required
        );
    }
public function registerArgument($arg, $help, $required = true, $command = '')
    {
        if (!isset($this->setup[$command])) {
            throw new Exception("Command $command not registered");
        }

        $this->setup[$command]['args'][] = array(
            'name' => $arg,
            'help' => $help,
            'required' => $required
        );
    }
public function registerArgument ( $ arg , $ help , $ required = true , $ command = '' ) { if ( ! isset ( $ this -> setup [ $ command ] ) ) { throw new Exception ( "Command $command not registered" ) ; } $ this -> setup [ $ command ] [ 'args' ] [ ] = array ( 'name' => $ arg , 'help' => $ help , 'required' => $ required ) ; }
Register the names of arguments for help generation and number checking

This has to be called in the order arguments are expected

@param string $arg argument name (just for help)
@param string $help help text
@param bool $required is this a required argument
@param string $command if theses apply to a sub command only
@throws Exception
Register the names of arguments for help generation and number checking