Ejemplo n.º 1
0
 /**
  * PHP5 constructor
  *
  * @global     object    $objTemplate
  * @global    array    $_ARRAYLANG
  */
 function __construct()
 {
     global $objTemplate, $_ARRAYLANG, $objInit;
     $this->objTpl = new \Cx\Core\Html\Sigma(ASCMS_CORE_MODULE_PATH . '/Cache/View/Template/Backend');
     $langData = $objInit->loadLanguageData('Cache');
     \Cx\Core\Csrf\Controller\Csrf::add_placeholder($this->objTpl);
     $this->objTpl->setErrorHandling(PEAR_ERROR_DIE);
     $this->arrSettings = $this->getSettings();
     $this->objSettings = new \Cx\Core\Config\Controller\Config();
     $cx = \Cx\Core\Core\Controller\Cx::instanciate();
     if (is_dir($cx->getWebsiteCachePath())) {
         if (is_writable($cx->getWebsiteCachePath())) {
             $this->strCachePath = $cx->getWebsiteCachePath() . '/';
         } else {
             $objTemplate->SetVariable('CONTENT_STATUS_MESSAGE', $_ARRAYLANG['TXT_CACHE_ERR_NOTWRITABLE'] . $cx->getWebsiteCachePath());
         }
     } else {
         $objTemplate->SetVariable('CONTENT_STATUS_MESSAGE', $_ARRAYLANG['TXT_CACHE_ERR_NOTEXIST'] . $cx->getWebsiteCachePath());
     }
     parent::__construct();
 }
 /**
  * Writes the cache file for the current request
  * @param \Cx\Core\ContentManager\Model\Entity\Page $page Current page (might be null for redirects before postResolve)
  * @param array $headers List of headers set for the current response
  * @param string $endcode Current response
  */
 public function writeCacheFileForRequest($page, $headers, $endcode)
 {
     $this->cache->writeCacheFileForRequest($page, $headers, $endcode);
 }
Ejemplo n.º 3
0
 /**
  * Constructor
  *
  * @global array $_CONFIG
  */
 public function __construct()
 {
     parent::__construct();
     $this->initContrexxCaching();
 }