public static function init() { // create db connection // see if tmp directories exist - and create if not $dir = PathManager::smartyCompileDir(); if (!file_exists($dir)) { mkdirfull($dir); } $dir = PathManager::smartyCacheDir(); if (!file_exists($dir)) { mkdirfull($dir); } $dir = PathManager::smartyMacroTemplateDir(); if (!file_exists($dir)) { mkdirfull($dir); } // connect to memcache server if (GlobalProperties::$USE_MEMCACHE == true) { self::$memcache = new Memcache(); self::$memcache->connect(GlobalProperties::$MEMCACHE_HOST, GlobalProperties::$MEMCACHE_PORT); self::$memcache->setCompressThreshold(5000); } else { self::$memcache = new DummyMemcache(); } }