private function getViewBestMatch(Request $request, $applicationName)
    {
        $best = null;
        
        if (count($this->views[$applicationName]) > 0) {
            foreach ($this->views[$applicationName] as $orderLevel => $views) {
                foreach ($views as $view) {
                    assert($view instanceof View);
                    if ($view->matchBoth($request->getController(), $request->getAction())) {
                        $best[$orderLevel] = $view;
                        continue 2;
                    }
                }
            }
        }
        if (null == $best) {
            throw new ViewException("No view found for request");
        }
        
        if (count($best) > 1) {
            krsort($best);
        }
        
        return reset($best);
    }