Ejemplo n.º 1
0
 /**
  * Pushes a new theme url to the end of the cascade -- 
  * if a theme file doesn't exist, we go backwards through the cascade
  * and if we locate it under a previous theme url, we use that one.
  * NOTE: If your webserver supports .htaccess files, you can implement
  * cascading themes much more efficiently: simply push ONE theme url
  * using this function, and implement the cascade using .htaccess files.
  * @method pushThemeUrl
  * @static
  * @param {string} $theme The url to be prepended to all non-absolute "src" attributes 
  * (except for iframes) rendered by Q_Html
  * @return {array} The new list of themes
  */
 static function pushThemeUrl($theme)
 {
     if (!self::$theme) {
         self::$theme = Q_Config::get('Q', 'theme', null);
     }
     self::$theme = Q_Valid::url($theme) ? $theme : Q_Request::baseUrl() . '/' . $theme;
     self::$themes[] = self::$theme;
     return self::$themes;
 }