/** * 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(); }
/** * 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')); } }
/** * 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(); }
/** * Constructor * * @return void */ protected function __construct() { parent::__construct(); $this->messages = $this->getMessages(); }
/** * 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(); } }
/** * 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); }
/** * Constructor * * @return void */ public function __construct() { parent::__construct(); $this->apiRequest = new \XLite\Module\CDev\XPaymentsConnector\Core\ApiRequest(); }
/** * 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'); }
/** * 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(); } }