示例#1
0
 /**
  * Pings a database connection and tries to reconnect it if it is broken.
  * @return bool
  */
 public function ping()
 {
     try {
         $this->connected || $this->connect();
         return $this->driver->ping();
     } catch (DriverException $e) {
         return FALSE;
     }
 }