protected function routeDefault($segments = array(), $route)
    {
        // If we don't have any segments left - try the default controller;
        // WARNING: Directories get shifted out of the segments array!
        if (empty($segments))
        {
            $segments[0] = $this->config->routing->default_controller;
        }

        if ($this->config->routing->translate_uri_dashes === true)
        {
            $segments[0] = str_replace('-', '_', $segments[0]);
            if (isset($segments[1]))
            {
                $segments[1] = str_replace('-', '_', $segments[1]);
            }
        }

        // Prepare the values for loading
        $controller = $segments[0];
        $function = (isset($segments[1]) ? $segments[1] : $this->config->routing->default_function);

        // And prepare the Router URI
        array_unshift($segments, null);
        unset($segments[0]);
        $this->uri->rsegments = $segments;

        // Now create a matches array
        $matches = array(
                'controller' => $controller,
                'function' => $function,
                'parameters' => array_slice($this->uri->rsegments, 2)
            );

        // And finally load the callable
        $this->callable = array('\FuzeWorks\Router', 'defaultCallable');
        $this->loadCallable($matches, $route);
    }
protected function routeDefault($segments = array(), $route)
    {
        // If we don't have any segments left - try the default controller;
        // WARNING: Directories get shifted out of the segments array!
        if (empty($segments))
        {
            $segments[0] = $this->config->routing->default_controller;
        }

        if ($this->config->routing->translate_uri_dashes === true)
        {
            $segments[0] = str_replace('-', '_', $segments[0]);
            if (isset($segments[1]))
            {
                $segments[1] = str_replace('-', '_', $segments[1]);
            }
        }

        // Prepare the values for loading
        $controller = $segments[0];
        $function = (isset($segments[1]) ? $segments[1] : $this->config->routing->default_function);

        // And prepare the Router URI
        array_unshift($segments, null);
        unset($segments[0]);
        $this->uri->rsegments = $segments;

        // Now create a matches array
        $matches = array(
                'controller' => $controller,
                'function' => $function,
                'parameters' => array_slice($this->uri->rsegments, 2)
            );

        // And finally load the callable
        $this->callable = array('\FuzeWorks\Router', 'defaultCallable');
        $this->loadCallable($matches, $route);
    }
protected function routeDefault ( $ segments = array ( ) , $ route ) { // If we don't have any segments left - try the default controller; // WARNING: Directories get shifted out of the segments array! if ( empty ( $ segments ) ) { $ segments [ 0 ] = $ this -> config -> routing -> default_controller ; } if ( $ this -> config -> routing -> translate_uri_dashes === true ) { $ segments [ 0 ] = str_replace ( '-' , '_' , $ segments [ 0 ] ) ; if ( isset ( $ segments [ 1 ] ) ) { $ segments [ 1 ] = str_replace ( '-' , '_' , $ segments [ 1 ] ) ; } } // Prepare the values for loading $ controller = $ segments [ 0 ] ; $ function = ( isset ( $ segments [ 1 ] ) ? $ segments [ 1 ] : $ this -> config -> routing -> default_function ) ; // And prepare the Router URI array_unshift ( $ segments , null ) ; unset ( $ segments [ 0 ] ) ; $ this -> uri -> rsegments = $ segments ; // Now create a matches array $ matches = array ( 'controller' => $ controller , 'function' => $ function , 'parameters' => array_slice ( $ this -> uri -> rsegments , 2 ) ) ; // And finally load the callable $ this -> callable = array ( '\FuzeWorks\Router' , 'defaultCallable' ) ; $ this -> loadCallable ( $ matches , $ route ) ; }
Converts a routing string into parameters for the defaultCallable.

@param array $segments Segments of the controller,method,parameters to open
@param string @route   The route which was matched
@return void
Converts a routing string into parameters for the defaultCallable .