private function isValidRoute(array $route)
    {
        if (!array_key_exists('path', $route)) {
            return false;
        }

        if (!array_key_exists('view.directRender', $route)) {
            $route['view.directRender'] = false;
        } else {
            if (!is_bool($route['view.directRender'])) {
                return false;
            }
        }

        if (!array_key_exists('view.layout', $route)) {
            $route['view.layout'] = false;
        } else {
            if (!is_string($route['view.layout'])) {
                return false;
            }
        }

        if (!array_key_exists('method', $route)) {
            $route['method'] = 'GET';
        }

        if (!array_key_exists('allow', $route)) {
            $route['allow'] = array();
        }

        if (!array_key_exists('from', $route['allow'])) {
            $route['allow']['from'] = '';
        }

        if (!array_key_exists('roles', $route['allow'])) {
            $route['allow']['roles'] = '';
        }

        $route['method'] = strtoupper($route['method']);

        if (!array_key_exists('params', $route)) {
            $route['params'] = array();
        }

        return $route;
    }