/** * Test wether the specified route exists. * * @param CmsRoute The route object * @param boolean A flag indicating that only static routes should be checked. * @return boolean */ public static function route_exists(CmsRoute $route, $static_only = FALSE) { self::_load_static_routes(); if (is_array(self::$_routes)) { if (isset(self::$_routes[$route->signature()])) { return TRUE; } } if ($static_only) { return FALSE; } if (is_array(self::$_dynamic_routes)) { if (isset(self::$_dynamic_routes[$route->signature()])) { return TRUE; } } return FALSE; }