public function __construct(array $config = NULL, $id = NULL) { if (!isset($config['group'])) { // Use the default group $config['group'] = RedisLibrary::$default; } // Load the database $this->_rd = RedisLibrary::instance($config['group']); parent::__construct($config, $id); }
public function disconnect() { try { // Database is assumed disconnected $status = TRUE; if (is_resource($this->_connection)) { if ($status = mysql_close($this->_connection)) { // Clear the connection $this->_connection = NULL; // Clear the instance parent::disconnect(); } } } catch (Exception $e) { // Database is probably not disconnected $status = !is_resource($this->_connection); } return $status; }