示例#1
0
 private function __construct($dbhost, $dbport, $username, $password, $dbname, $dbcharset, $cachesys, $cachetype, $cachehost, $cacheport)
 {
     try {
         $this->_dbh = new PDO('mysql:host=' . $dbhost . ';port=' . $dbport . ';dbname=' . $dbname, $username, $password);
         $this->_dbh->query('SET NAMES ' . $dbcharset);
     } catch (PDOException $e) {
         exit('<pre><b>Connection failed:</b> ' . $e->getMessage());
     }
     $this->_cache = db_Cache::instance($cachehost, $cacheport, $cachetype, $cachesys);
     if (!$this->_cache) {
     }
 }
示例#2
0
 protected function __construct()
 {
     $this->cache = db_Cache::instance();
     $this->rest = rest_Server::instance();
 }
示例#3
0
 protected function __construct()
 {
     $this->cache = db_Cache::instance();
 }