Ejemplo n.º 1
0
 /**
  * Constructor
  * Creates directory for locks if needed
  */
 public function __construct()
 {
     if (!\Includes\Utils\FileManager::isExists(rtrim(static::LOCK_DIR, LC_DS))) {
         \Includes\Utils\FileManager::mkdirRecursive(rtrim(static::LOCK_DIR, LC_DS));
     }
     if (!\Includes\Utils\FileManager::isReadable(static::LOCK_DIR) || !\Includes\Utils\FileManager::isWriteable(static::LOCK_DIR)) {
         \XLite\Logger::getInstance()->log('Cannot create lock for keys', LOG_DEBUG);
     }
     parent::__construct();
 }
Ejemplo n.º 2
0
 /**
  * Update and re-read options
  *
  * @return void
  */
 public function update()
 {
     parent::update();
     $this->readConfig(true);
 }
Ejemplo n.º 3
0
 /**
  * Method to access a singleton
  *
  * @return \Mobile_Detect
  */
 public static function getInstance()
 {
     return parent::getInstance()->detect;
 }
Ejemplo n.º 4
0
 /**
  * Constructor
  */
 protected function __construct()
 {
     parent::__construct();
     $this->setOptions();
     $this->skinsCache = (bool) \XLite::getInstance()->getOptions(array('performance', 'skins_cache'));
     if ($this->skinsCache) {
         $this->restoreSkins();
         register_shutdown_function(array($this, 'saveSkins'));
     }
 }
Ejemplo n.º 5
0
 /**
  * Constructor
  *
  * @return void
  */
 protected function __construct()
 {
     parent::__construct();
     $this->checkTemplateStatus = LC_DEVELOPER_MODE || \XLite::getInstance()->getOptions(array('skin_details', 'check_templates_status'));
     $this->rootDirLength = strlen(LC_DIR_ROOT);
     $this->compileDir = \Includes\Decorator\Utils\CacheManager::getCompileDir();
 }
Ejemplo n.º 6
0
 /**
  * Constructor
  *
  * @return void
  */
 protected function __construct()
 {
     parent::__construct();
     $this->messages = $this->getMessages();
 }
Ejemplo n.º 7
0
 /**
  * Protected constructor
  *
  * @return void
  */
 protected function __construct()
 {
     parent::__construct();
     // Upload addons info into the database
     \XLite\Core\Marketplace::getInstance()->saveAddonsList($this->getCacheTTL());
     $coreVersionBeforeUpgrade = \XLite\Core\Config::getInstance()->Internal->coreVersionBeforeUpgrade;
     // WARNING! Do not change the order of the structure data.
     // The NEW information must be added to the TAIL of the structure strictly!
     list($entries, $isUpgraded, $disabledModulesHooks, $incompatibleModules, $preUpgradeWarningModules) = \XLite\Core\TmpVars::getInstance()->{self::CELL_NAME};
     // Hack for the 5.1.2 and previous versions.
     // @see #BUG-537 for more details
     if ($coreVersionBeforeUpgrade && version_compare($coreVersionBeforeUpgrade, '5.1.2', '<=')) {
         list($entries, $incompatibleModules, $isUpgraded, $disabledModulesHooks, $preUpgradeWarningModules) = \XLite\Core\TmpVars::getInstance()->{self::CELL_NAME};
     }
     if (is_array($entries)) {
         $this->entries = array_merge($this->entries, $entries);
         $this->incompatibleModules = $this->incompatibleModules + (array) $incompatibleModules;
         $this->disabledModulesHooks = $this->disabledModulesHooks + (array) $disabledModulesHooks;
         $this->preUpgradeWarningModules = $this->preUpgradeWarningModules + (array) $preUpgradeWarningModules;
         $this->setUpgraded(!empty($isUpgraded));
     } else {
         $this->collectEntries();
     }
 }
Ejemplo n.º 8
0
 /**
  * Constructor
  *
  * @return void
  */
 protected function __construct()
 {
     parent::__construct();
     $this->checkTemplateStatus = LC_DEVELOPER_MODE || \XLite\Core\Config::getInstance()->Performance->check_templates_status;
     $this->rootDirLength = strlen(LC_DIR_ROOT);
 }
Ejemplo n.º 9
0
 /**
  * Constructor
  *
  * @return void 
  */
 public function __construct()
 {
     parent::__construct();
     $this->apiRequest = new \XLite\Module\CDev\XPaymentsConnector\Core\ApiRequest();
 }
Ejemplo n.º 10
0
 /**
  * Constructor
  * 
  * @return void
  */
 protected function __construct()
 {
     parent::__construct();
     $this->filesRepositories = array(\Includes\Decorator\Utils\CacheManager::getCompileDir() => 'compiled classes repository', LC_DIR_ROOT => 'X-Cart root');
 }
Ejemplo n.º 11
0
Archivo: Cell.php Proyecto: kingsj/core
 /**
  * Protected constructor
  *
  * @return void
  */
 protected function __construct()
 {
     parent::__construct();
     // Upload addons info into the database
     \XLite\Core\Marketplace::getInstance()->saveAddonsList($this->getCacheTTL());
     list($entries, $incompatibleModules, $isUpgraded) = \XLite\Core\TmpVars::getInstance()->{self::CELL_NAME};
     if (is_array($entries)) {
         $this->entries = array_merge($this->entries, $entries);
         $this->incompatibleModules = $this->incompatibleModules + (array) $incompatibleModules;
         $this->setUpgraded(!empty($isUpgraded));
     } else {
         $this->collectEntries();
     }
 }