public function parse($url)
    {
        $this->_fixUrlForParsing($url);

        if (empty($url->path) && !isset($url->query['option'])) {
            $url->path = (get_viewer()->guest()) ? 'pages' : 'dashboard';
        }

        $segments = explode('/', trim($url->path, '/'));
        $segments = array_filter($segments);

        if (!empty($segments)) {
            $component = array_shift($segments);
            $url->query = array_merge(array('option' => 'com_'.$component), $url->query);
            $component = str_replace('com_', '', $url->query['option']);
            $query = $this->getComponentRouter($component)->parse($segments);
            $url->query = array_merge($url->query, array('option' => 'com_'.$component), $query);
        }

        return $url;
    }
public function parse($url)
    {
        $this->_fixUrlForParsing($url);

        if (empty($url->path) && !isset($url->query['option'])) {
            $url->path = (get_viewer()->guest()) ? 'pages' : 'dashboard';
        }

        $segments = explode('/', trim($url->path, '/'));
        $segments = array_filter($segments);

        if (!empty($segments)) {
            $component = array_shift($segments);
            $url->query = array_merge(array('option' => 'com_'.$component), $url->query);
            $component = str_replace('com_', '', $url->query['option']);
            $query = $this->getComponentRouter($component)->parse($segments);
            $url->query = array_merge($url->query, array('option' => 'com_'.$component), $query);
        }

        return $url;
    }
public function parse ( $ url ) { $ this -> _fixUrlForParsing ( $ url ) ; if ( empty ( $ url -> path ) && ! isset ( $ url -> query [ 'option' ] ) ) { $ url -> path = ( get_viewer ( ) -> guest ( ) ) ? 'pages' : 'dashboard' ; } $ segments = explode ( '/' , trim ( $ url -> path , '/' ) ) ; $ segments = array_filter ( $ segments ) ; if ( ! empty ( $ segments ) ) { $ component = array_shift ( $ segments ) ; $ url -> query = array_merge ( array ( 'option' => 'com_' . $ component ) , $ url -> query ) ; $ component = str_replace ( 'com_' , '' , $ url -> query [ 'option' ] ) ; $ query = $ this -> getComponentRouter ( $ component ) -> parse ( $ segments ) ; $ url -> query = array_merge ( $ url -> query , array ( 'option' => 'com_' . $ component ) , $ query ) ; } return $ url ; }
Parses the URI.

@param $uri
Parses the URI .