/var/www/clients/client1/web1/web/controller/class/controller/controller.php
$ret = true;
}
}
return $ret;
}
}
private function _loadConfigFromCache() {
if ($this->getMemcached()) {
$memcacheD = new \Memcached();
if ($memcacheD->addServer($this->getMemcached()->host, $this->getMemcached()->port)) {
if ($memcacheD->get('controller_config_1') !== false and $memcacheD->get('controller_config_2') !== false) {
CONTROLLER\CONFIG::setClasses($memcacheD->get('controller_config_1'));
$this->_config = $memcacheD->get('controller_config_2');
return false;
}
}
} else {
$config = file('tmp/cache/config.php');
CONTROLLER\CONFIG::setClasses(unserialize(urldecode($config[1])));
$this->_config = unserialize(urldecode($config[2]));
// var_dump('from-filecache');
return false;
}
}
public function _generateConfigFromConfigFile() {
require_once('config.php');
$this->addSmartyComponentDirs();
$this->getConfig()
->initLogStatus();
}
public function _storeConfigToCache() {
if ($this->getMemcached()) {
$memcacheD = new \Memcached();
if ($memcacheD->addServer($this->getMemcached()->host, $this->getMemcached()->port)) {
$memcacheD->set('controller_config_1', CONTROLLER\CONFIG::getClasses());
$memcacheD->set('controller_config_2', self::getInstance()
/var/www/clients/client1/web1/web/controller/class/controller/controller.php
$ret = true;
}
}
return $ret;
}
}
private function _loadConfigFromCache() {
if ($this->getMemcached()) {
$memcacheD = new \Memcached();
if ($memcacheD->addServer($this->getMemcached()->host, $this->getMemcached()->port)) {
if ($memcacheD->get('controller_config_1') !== false and $memcacheD->get('controller_config_2') !== false) {
CONTROLLER\CONFIG::setClasses($memcacheD->get('controller_config_1'));
$this->_config = $memcacheD->get('controller_config_2');
return false;
}
}
} else {
$config = file('tmp/cache/config.php');
CONTROLLER\CONFIG::setClasses(unserialize(urldecode($config[1])));
$this->_config = unserialize(urldecode($config[2]));
// var_dump('from-filecache');
return false;
}
}
public function _generateConfigFromConfigFile() {
require_once('config.php');
$this->addSmartyComponentDirs();
$this->getConfig()
->initLogStatus();
}
public function _storeConfigToCache() {
if ($this->getMemcached()) {
$memcacheD = new \Memcached();
if ($memcacheD->addServer($this->getMemcached()->host, $this->getMemcached()->port)) {
$memcacheD->set('controller_config_1', CONTROLLER\CONFIG::getClasses());
$memcacheD->set('controller_config_2', self::getInstance()
/var/www/clients/client1/web1/web/controller/class/controller/controller.php
ini_set('xdebug.var_display_max_children', '-1');
ini_set('xdebug.var_display_max_depth', '-1');
session_start();
spl_autoload_register(array($this, '_autoload'));
$this->_timer = new TIMER();
$this->_timer->add('CONTROLLER::init start');
// var_dump($this->_configLoadedFromCache());
ERROR::init();
// if ($this->_useConfigCache()) {
// $this->_loadConfigFromCache();
// if (CONTROLLER::getInstance()
// ->getConfig() == NULL) {
// die("A rendszer nincs konfigurálva.");
// }
// } else {
// $this->_generateConfigFromConfigFile();
// $this->_storeConfigToCache();
// }
if ($this->_useConfigCache()) {
$this->_loadConfigFromCache();
if (CONTROLLER::getInstance()
->getConfig() == NULL) {
die("A rendszer nincs konfigurálva.");
}
} else {
$this->_generateConfigFromConfigFile();
$this->_storeConfigToCache();
}
RESPONSE::init();
REQUEST_HANDLER::init();
$this->_timer->add('CONTROLLER::init end');
$this->handleControllerOrModuleRedirects();
\CO\HELPER\POST::initByRawRequestBody();
}
private function handleControllerOrModuleRedirects() {
if (REQUEST_HANDLER::getModule() == 'cp') {
REQUEST_HANDLER::$_site = 'cp';
\CO\SYSTEM\CONTROL_PANEL::handle();
/var/www/clients/client1/web1/web/index.php
<?php
require_once(__DIR__ .'/functions.php');
require_once(__DIR__ .'/controller/class/controller/controller.php');
require_once 'controller/class/domain/domain.php';
ini_set("session.cookie_domain", \CO\SYSTEM\DOMAIN::getDomainName(false, true));
$controller = new CO\SYSTEM\CONTROLLER();
//$controller->useMemcached('127.0.0.1', 11211);
$controller->init();
\CO\HELPER\DATETIME::setTimezoneOffset('+01:00');
$controller->execute();