protected function parseArguments()
    {
        $args = $this->getNamedArgs();

        $this->climate->arguments->add($args);

        if ($_SERVER['argc'] === 1) {
            $this->help();
            return false;
        }

        if ($this->climate->arguments->defined('help')) {
            $this->help();
            return;
        }

        if ($this->climate->arguments->defined('version')) {
            echo $this->version();
            return;
        }

        try {
            $this->climate->arguments->parse($_SERVER['argv']);

            $padding = count($args);
            foreach ($this->climate->arguments->toArray() as $arg) {
                if ($arg === null) {
                    --$padding;
                }
            }
            $argSize = count($_SERVER['argv']) - $padding - 1;
            for ($i = 0; $i < $argSize; $i++) {
                $args['arg-' . $i] = [];
            }
            $this->climate->arguments->add($args);
            $this->climate->arguments->parse($_SERVER['argv']);
        } catch (\Exception $e) {
        }

        return true;
    }
protected function parseArguments()
    {
        $args = $this->getNamedArgs();

        $this->climate->arguments->add($args);

        if ($_SERVER['argc'] === 1) {
            $this->help();
            return false;
        }

        if ($this->climate->arguments->defined('help')) {
            $this->help();
            return;
        }

        if ($this->climate->arguments->defined('version')) {
            echo $this->version();
            return;
        }

        try {
            $this->climate->arguments->parse($_SERVER['argv']);

            $padding = count($args);
            foreach ($this->climate->arguments->toArray() as $arg) {
                if ($arg === null) {
                    --$padding;
                }
            }
            $argSize = count($_SERVER['argv']) - $padding - 1;
            for ($i = 0; $i < $argSize; $i++) {
                $args['arg-' . $i] = [];
            }
            $this->climate->arguments->add($args);
            $this->climate->arguments->parse($_SERVER['argv']);
        } catch (\Exception $e) {
        }

        return true;
    }
protected function parseArguments ( ) { $ args = $ this -> getNamedArgs ( ) ; $ this -> climate -> arguments -> add ( $ args ) ; if ( $ _SERVER [ 'argc' ] === 1 ) { $ this -> help ( ) ; return false ; } if ( $ this -> climate -> arguments -> defined ( 'help' ) ) { $ this -> help ( ) ; return ; } if ( $ this -> climate -> arguments -> defined ( 'version' ) ) { echo $ this -> version ( ) ; return ; } try { $ this -> climate -> arguments -> parse ( $ _SERVER [ 'argv' ] ) ; $ padding = count ( $ args ) ; foreach ( $ this -> climate -> arguments -> toArray ( ) as $ arg ) { if ( $ arg === null ) { -- $ padding ; } } $ argSize = count ( $ _SERVER [ 'argv' ] ) - $ padding - 1 ; for ( $ i = 0 ; $ i < $ argSize ; $ i ++ ) { $ args [ 'arg-' . $ i ] = [ ] ; } $ this -> climate -> arguments -> add ( $ args ) ; $ this -> climate -> arguments -> parse ( $ _SERVER [ 'argv' ] ) ; } catch ( \ Exception $ e ) { } return true ; }
Parse incoming arguments

@return bool|void
Parse incoming arguments