public function __construct()
 {
     $this->Memcache = new Memcache();
     $host = 'localhost';
     $port = '11211';
     if (Conf::read('Cache.Memcache.Server.Host')) {
         $host = Conf::read('Cache.Memcache.Server.Host');
     }
     if (Conf::read('Cache.Memcache.Server.Port')) {
         $port = Conf::read('Cache.Memcache.Server.Port');
     }
     $this->Memcache->addServer($host, $port);
     $this->Memcache->setCompressThreshold(16384, 0.2);
 }
 public static function store($debuggable, $min_debug_level = 2)
 {
     if (!$min_debug_level) {
         $min_debug_level = 1;
     }
     if (Conf::read('DEBUG') >= $min_debug_level) {
         $trace = debug_backtrace();
         $file = $trace[0]['file'];
         $line = $trace[0]['line'];
         self::$data[] = array('file' => $file, 'line' => $line, 'data' => $debuggable);
         $path = null;
         if (!file_exists($path)) {
             $path = SERVER_APP_DIR . '/../log/debug';
         }
         error_log("{$file}:{$line} - {$debuggable}\n", 3, $path);
     }
 }
                    if (Cache_StaticMemcache::isEnabled()) {
                        break;
                    }
                case 'Cache_Memcache':
                    if (Cache_Memcache::isEnabled()) {
                        break;
                    }
                case 'Cache_Static':
                default:
                    $engine = 'Cache_Static';
            }
            if (is_null(Cache::$Instance)) {
                Cache::$Instance = new $engine();
            }
        } catch (Exception $e) {
            //if (Conf::read('DEBUG')) {
            //	throw $e;
            //} else {
            return null;
            //}
        }
    }
}
if (Conf::exists('Cache.Engine')) {
    Cache::initalize(Conf::read('Cache.Engine'));
} else {
    Cache::initalize();
}
if (Conf::exists('Cache.Life')) {
    Cache::$cacheLifeLength = Conf::read('Cache.Life');
}
 public function link()
 {
     if (isset($_REQUEST['txt'])) {
         $txt = $_REQUEST['txt'];
     } else {
         $txt = sprintf('%s Promotional Platform', Conf::read('ENV.CompanyName'));
     }
     $this->setTemplate('blank');
     $this->display($this->getTpl('link', array('url' => $_REQUEST['url'], 'txt' => $txt)));
 }
<?php

if (file_exists(SERVER_APP_CONF_DIR . '/local-configuration.php')) {
    include_once SERVER_APP_CONF_DIR . '/local-configuration.php';
}
$debug_level = Conf::read('DEBUG');
if (Conf::read('DEBUG') > 0) {
    error_reporting(E_ALL);
    ini_set('display_errors', '1');
} else {
}