Пример #1
0
 public function __construct()
 {
     require_once _CORE_ROOT . 'factory.class.php';
     require_once _CORE_ROOT . 'cexception.class.php';
     //require_once(_CORE_ROOT.'error.class.php');
     $this->benchmark = factory::createBenchmarkObject();
     $this->db = factory::createDbObject();
     $this->tpl = factory::createTplObject($this->benchmark);
     $this->input = factory::createInputObject();
     $this->log = factory::createLogger();
     factory::createUtil();
     if (_MEMCACHE_ENABLE) {
         $this->memcache = factory::createMemcacheObject();
     }
     if (_DEBUG === 'Y') {
         ini_set('display_errors', 1);
         error_reporting(E_ALL);
         $this->debug = factory::createDebugObject($this->benchmark);
     } else {
         if (_DEBUG === 'N') {
             ini_set('display_errors', 0);
             error_reporting(E_ALL ^ E_NOTICE);
             $this->debug = factory::createNoDebugObject();
         } else {
             //nothing todo ;
         }
     }
 }