public function registerCommand($command, $help)
    {
        if (isset($this->setup[$command])) {
            throw new Exception("Command $command already registered");
        }

        $this->setup[$command] = array(
            'opts' => array(),
            'args' => array(),
            'help' => $help
        );

    }
public function registerCommand($command, $help)
    {
        if (isset($this->setup[$command])) {
            throw new Exception("Command $command already registered");
        }

        $this->setup[$command] = array(
            'opts' => array(),
            'args' => array(),
            'help' => $help
        );

    }
public function registerCommand ( $ command , $ help ) { if ( isset ( $ this -> setup [ $ command ] ) ) { throw new Exception ( "Command $command already registered" ) ; } $ this -> setup [ $ command ] = array ( 'opts' => array ( ) , 'args' => array ( ) , 'help' => $ help ) ; }
This registers a sub command

Sub commands have their own options and use their own function (not main()).

@param string $command
@param string $help
@throws Exception
This registers a sub command