Пример #1
0
 public function __construct()
 {
     $helper = new DbHelper();
     $this->db = $helper->getConnector();
     $this->tableMsg = DB_PREFIX . '_cache_msg';
     $this->tableRetry = DB_PREFIX . '_cache_retry';
 }
Пример #2
0
 /**
  * @throws ApiException
  */
 public function __construct()
 {
     $helper = new DbHelper();
     $this->db = $helper->getConnector();
     $this->createTime = time();
     $this->table = DB_PREFIX . '_cache_oauth';
 }
Пример #3
0
 /**
  * @throws PDOException
  */
 public function __construct()
 {
     try {
         $helper = new \wlight\util\DbHelper();
         $this->sql = $helper->getConnector();
     } catch (\PDOException $e) {
         throw $e;
     }
 }
Пример #4
0
 /**
  * @throws PDOException
  */
 public function __construct()
 {
     try {
         $helper = new \wlight\util\DbHelper();
         $this->db = $helper->getConnector();
         $this->tag = DB_PREFIX . '_statis_tag';
         $this->message = DB_PREFIX . '_statis_message';
     } catch (\PDOException $e) {
         $this->sql = null;
         throw $e;
     }
 }
Пример #5
0
 public static function resetMysql()
 {
     $cacheMsg = self::$cacheMsg;
     $cacheRetry = self::$cacheRetry;
     $cacheOauth = self::$cacheOauth;
     $helper = new DbHelper();
     $helper->set(DbHelper::TYPE, 'mysql');
     $link = $helper->getConnector();
     $link->exec("DELETE FROM `{$cacheMsg}` WHERE 1");
     $link->exec("DELETE FROM `{$cacheRetry}` WHERE 1");
     $link->exec("DELETE FROM `{$cacheOauth}` WHERE 1");
 }