src/CLIParser.php
public function setEnv($shortOptions = '', array $longOptions = array(), array $argv = array())
    {
        
        if (!empty($argv)) {
            $this->argv = $argv;
            $this->argc = count($argv);
        }
        
        $this->shortOptions = $shortOptions;
        $this->longOptions  = $longOptions;
        
        $this->program = $this->argv[0];
        
    }
public function setEnv($shortOptions = '', array $longOptions = array(), array $argv = array())
    {
        
        if (!empty($argv)) {
            $this->argv = $argv;
            $this->argc = count($argv);
        }
        
        $this->shortOptions = $shortOptions;
        $this->longOptions  = $longOptions;
        
        $this->program = $this->argv[0];
        
    }
public function setEnv ( $ shortOptions = '' , array $ longOptions = array ( ) , array $ argv = array ( ) ) { if ( ! empty ( $ argv ) ) { $ this -> argv = $ argv ; $ this -> argc = count ( $ argv ) ; } $ this -> shortOptions = $ shortOptions ; $ this -> longOptions = $ longOptions ; $ this -> program = $ this -> argv [ 0 ] ; }
Sets the working environment for the program

Creates local copies of global $argv and $argc and allows to rewrite the $argv array

@param string $shortOptions A string of allowed single-char options.
Parametrized options are followed by the ':' character

@param array  $longOptions  An array of allowed long options which contains:
name (string), parameter need (boolean TRUE/FALSE) and
optional short-option equivalent (char)
@param array  $argv         An array of arguments formatted as the real $argv

@return void
Sets the working environment for the program