private static function parseUri(Request &$request,
    		$uri, $defaultController, $defaultAction)
    {
        // All beyond the context prefix is our application request uri
        $contextUri = $uri;
        if (null != $request->getContextPrefix() && '/' != $request->getContextPrefix()) {
        	$contextUri = str_replace($request->getContextPrefix(), '', $uri);
        }
        
        // Split parts
        $parts = array();
        if ($contextUri != '') {
            while (isset($contextUri[0]) && $contextUri[0] == '/') {
                $contextUri = substr($contextUri, 1);
            }
            $parts = explode('/', $contextUri);
        }
        
        // Check if there was a controller requested
        if (count($parts) > 0) {
            $request->setController( ucfirst(trim($parts[0])) );
            array_shift($parts);
            if (! $request->getController()) {
                $request->setController( $defaultController );
            }
        }
        
        // Check if there was an action requested
        if (count($parts) > 0) {
            $request->setAction( trim($parts[0]) );
            array_shift($parts);
            if (! $request->getAction()) {
                $request->setAction( $defaultAction );
            }
        }
        
        return $parts;
    }