public function checkArguments()
    {
        $argc = count($this->args);

        $req = 0;
        foreach ($this->setup[$this->command]['args'] as $arg) {
            if (!$arg['required']) {
                break;
            } // last required arguments seen
            $req++;
        }

        if ($req > $argc) {
            throw new Exception("Not enough arguments", Exception::E_OPT_ARG_REQUIRED);
        }
    }
public function checkArguments()
    {
        $argc = count($this->args);

        $req = 0;
        foreach ($this->setup[$this->command]['args'] as $arg) {
            if (!$arg['required']) {
                break;
            } // last required arguments seen
            $req++;
        }

        if ($req > $argc) {
            throw new Exception("Not enough arguments", Exception::E_OPT_ARG_REQUIRED);
        }
    }
public function checkArguments ( ) { $ argc = count ( $ this -> args ) ; $ req = 0 ; foreach ( $ this -> setup [ $ this -> command ] [ 'args' ] as $ arg ) { if ( ! $ arg [ 'required' ] ) { break ; } // last required arguments seen $ req ++ ; } if ( $ req > $ argc ) { throw new Exception ( "Not enough arguments" , Exception :: E_OPT_ARG_REQUIRED ) ; } }
Checks the actual number of arguments against the required number

Throws an exception if arguments are missing.

This is run from CLI automatically and usually does not need to be called directly

@throws Exception
Checks the actual number of arguments against the required number