private function formatParameters()
    {
        foreach ($GLOBALS['argv'] as $key => $param) {
            if ($key == 0) {
                continue;
            }

            if ($key == 1) {
                $this->initCommand($param);
                continue;
            }

            if ($key == 2 && preg_match('/^[a-z0-9_\/-]+$/i', $param)) {
                $this->options['target'] = $param;
            } elseif (preg_match('/^--[a-z-]+$/', $param)) {
                $this->options['options'][$param] = true;
            } elseif (count($part = explode('=', $param)) == 2) {
                $this->options['options'][$part[0]] = $part[1];
            } else {
                $this->options['trash'][] = $param;
            }
        }

        if (isset($this->options['options'])) {
            $this->options['options'] = new Collection($this->options['options']);
        }
    }
private function formatParameters()
    {
        foreach ($GLOBALS['argv'] as $key => $param) {
            if ($key == 0) {
                continue;
            }

            if ($key == 1) {
                $this->initCommand($param);
                continue;
            }

            if ($key == 2 && preg_match('/^[a-z0-9_\/-]+$/i', $param)) {
                $this->options['target'] = $param;
            } elseif (preg_match('/^--[a-z-]+$/', $param)) {
                $this->options['options'][$param] = true;
            } elseif (count($part = explode('=', $param)) == 2) {
                $this->options['options'][$part[0]] = $part[1];
            } else {
                $this->options['trash'][] = $param;
            }
        }

        if (isset($this->options['options'])) {
            $this->options['options'] = new Collection($this->options['options']);
        }
    }
private function formatParameters ( ) { foreach ( $ GLOBALS [ 'argv' ] as $ key => $ param ) { if ( $ key == 0 ) { continue ; } if ( $ key == 1 ) { $ this -> initCommand ( $ param ) ; continue ; } if ( $ key == 2 && preg_match ( '/^[a-z0-9_\/-]+$/i' , $ param ) ) { $ this -> options [ 'target' ] = $ param ; } elseif ( preg_match ( '/^--[a-z-]+$/' , $ param ) ) { $ this -> options [ 'options' ] [ $ param ] = true ; } elseif ( count ( $ part = explode ( '=' , $ param ) ) == 2 ) { $ this -> options [ 'options' ] [ $ part [ 0 ] ] = $ part [ 1 ] ; } else { $ this -> options [ 'trash' ] [ ] = $ param ; } } if ( isset ( $ this -> options [ 'options' ] ) ) { $ this -> options [ 'options' ] = new Collection ( $ this -> options [ 'options' ] ) ; } }
Format the options

@return void
Format the options