private function mapRoute2IndexKey($route)
    {
        $route = rtrim($route, "/");

        if (key_exists($route, $this->index)) {
            return $route;
        } elseif (empty($route) && key_exists("index", $this->index)) {
            return "index";
        } elseif (key_exists($route . "/index", $this->index)) {
            return "$route/index";
        }

        return false;
    }
private function mapRoute2IndexKey($route)
    {
        $route = rtrim($route, "/");

        if (key_exists($route, $this->index)) {
            return $route;
        } elseif (empty($route) && key_exists("index", $this->index)) {
            return "index";
        } elseif (key_exists($route . "/index", $this->index)) {
            return "$route/index";
        }

        return false;
    }
private function mapRoute2IndexKey ( $ route ) { $ route = rtrim ( $ route , "/" ) ; if ( key_exists ( $ route , $ this -> index ) ) { return $ route ; } elseif ( empty ( $ route ) && key_exists ( "index" , $ this -> index ) ) { return "index" ; } elseif ( key_exists ( $ route . "/index" , $ this -> index ) ) { return "$route/index" ; } return false ; }
Map the route to the correct key in the index.

@param string $route current route used to access page.

@return string as key or false if no match.
Map the route to the correct key in the index .