Ejemplo n.º 1
0
 /**
  * Returns current instance of the StaticHtmlCache.
  *
  * @return StaticHtmlCache
  */
 public static function getInstance()
 {
     if (!isset(static::$instance)) {
         $cacheProvider = static::getCacheProvider();
         $privateKey = $cacheProvider !== null ? $cacheProvider->getCachePrivateKey() : null;
         static::$instance = new static(\CHTMLPagesCache::getRequestUri(), \CHTMLPagesCache::getHttpHost(), \CHTMLPagesCache::getRealPrivateKey($privateKey));
         static::$instance->enableDebug();
         if ($cacheProvider !== null) {
             static::$instance->setCacheProvider($cacheProvider);
         }
     }
     return static::$instance;
 }