Mage/Config.php
/**
     * Parse the Command Line options
     * @return boolean
     */
Parse the Command Line options
@return boolean
Parse the Command Line options @return boolean
protected function parse($arguments)
    {
    	foreach ($arguments as $argument) {
    		if (preg_match('/to:[\w]+/i', $argument)) {
    			$this->environment = str_replace('to:', '', $argument);
    		} else if (preg_match('/--[\w]+/i', $argument)) {
    			$optionValue = explode('=', substr($argument, 2));
    			if (count($optionValue) == 1) {
    				$this->parameters[$optionValue[0]] = true;
    			} else if (count($optionValue) == 2) {
    				if (strtolower($optionValue[1]) == 'true') {
    					$this->parameters[$optionValue[0]] = true;
    				} else if (strtolower($optionValue[1]) == 'false') {
    					$this->parameters[$optionValue[0]] = false;
    				} else {
    					$this->parameters[$optionValue[0]] = $optionValue[1];
    				}
    			}
    		} else {
    			$this->arguments[] = $argument;
    		}
    	}
    }
protected function parse ( $ arguments ) { foreach ( $ arguments as $ argument ) { if ( preg_match ( '/to:[\w]+/i' , $ argument ) ) { $ this -> environment = str_replace ( 'to:' , '' , $ argument ) ; } else if ( preg_match ( '/--[\w]+/i' , $ argument ) ) { $ optionValue = explode ( '=' , substr ( $ argument , 2 ) ) ; if ( count ( $ optionValue ) == 1 ) { $ this -> parameters [ $ optionValue [ 0 ] ] = true ; } else if ( count ( $ optionValue ) == 2 ) { if ( strtolower ( $ optionValue [ 1 ] ) == 'true' ) { $ this -> parameters [ $ optionValue [ 0 ] ] = true ; } else if ( strtolower ( $ optionValue [ 1 ] ) == 'false' ) { $ this -> parameters [ $ optionValue [ 0 ] ] = false ; } else { $ this -> parameters [ $ optionValue [ 0 ] ] = $ optionValue [ 1 ] ; } } } else { $ this -> arguments [ ] = $ argument ; } } }
Parse the Command Line options
 @return boolean
Parse the Command Line options @return boolean