private function _set_default_vars_values()
    {
        $default_action = 'index';
        
        if (!$this->_assets_route) {
            # Action defaulted to "index" even thought _to said
            # otherwise.
            if ($this->_to) {
                try {
                    $token = new UrlToken($this->_to);
                    list($controller, $default_action) = $token->parts();
                } catch (Exception $e) {
                }
            }
        }
        
        if (!isset($this->_defaults['action']))
            $this->_defaults['action'] = $default_action;
        
        foreach ($this->_defaults as $var => $val) {
            if ($var == 'action') {
                if ($val == ':action') {
                    $val = 'index';
                }
                $this->_action = $val;
            } elseif ($var == 'controller')
                $this->_controller = $val;
            $this->_vars[$var]['value'] = $val;
        }
        
        if (!isset($this->_vars['format']['value']) || $this->_vars['format']['value'] === '')
            $this->_vars['format']['value'] = 'html';
        $this->_format = $this->_vars['format']['value'];
        
        $this->_defaults = null;
    }
private function _set_default_vars_values()
    {
        $default_action = 'index';
        
        if (!$this->_assets_route) {
            # Action defaulted to "index" even thought _to said
            # otherwise.
            if ($this->_to) {
                try {
                    $token = new UrlToken($this->_to);
                    list($controller, $default_action) = $token->parts();
                } catch (Exception $e) {
                }
            }
        }
        
        if (!isset($this->_defaults['action']))
            $this->_defaults['action'] = $default_action;
        
        foreach ($this->_defaults as $var => $val) {
            if ($var == 'action') {
                if ($val == ':action') {
                    $val = 'index';
                }
                $this->_action = $val;
            } elseif ($var == 'controller')
                $this->_controller = $val;
            $this->_vars[$var]['value'] = $val;
        }
        
        if (!isset($this->_vars['format']['value']) || $this->_vars['format']['value'] === '')
            $this->_vars['format']['value'] = 'html';
        $this->_format = $this->_vars['format']['value'];
        
        $this->_defaults = null;
    }
private function _set_default_vars_values ( ) { $ default_action = 'index' ; if ( ! $ this -> _assets_route ) { # Action defaulted to "index" even thought _to said # otherwise. if ( $ this -> _to ) { try { $ token = new UrlToken ( $ this -> _to ) ; list ( $ controller , $ default_action ) = $ token -> parts ( ) ; } catch ( Exception $ e ) { } } } if ( ! isset ( $ this -> _defaults [ 'action' ] ) ) $ this -> _defaults [ 'action' ] = $ default_action ; foreach ( $ this -> _defaults as $ var => $ val ) { if ( $ var == 'action' ) { if ( $ val == ':action' ) { $ val = 'index' ; } $ this -> _action = $ val ; } elseif ( $ var == 'controller' ) $ this -> _controller = $ val ; $ this -> _vars [ $ var ] [ 'value' ] = $ val ; } if ( ! isset ( $ this -> _vars [ 'format' ] [ 'value' ] ) || $ this -> _vars [ 'format' ] [ 'value' ] === '' ) $ this -> _vars [ 'format' ] [ 'value' ] = 'html' ; $ this -> _format = $ this -> _vars [ 'format' ] [ 'value' ] ; $ this -> _defaults = null ; }
Set index = action by default.
Set index = action by default .