37 return $this->config->dbprefix;
46 if (isset($this->config->db_disable_query_cache)) {
47 return !$this->config->db_disable_query_cache;
59 if (isset($this->config->db) && isset($this->config->db[
'split'])) {
60 return $this->config->db[
'split'];
64 if (isset($this->config->db) && isset($this->config->db->split)) {
65 return $this->config->db->split;
107 'host' => $this->config->dbhost,
108 'user' => $this->config->dbuser,
109 'password' => $this->config->dbpass,
110 'database' => $this->config->dbname,
121 if (is_object($this->config->db[
$type])) {
124 'host' => $this->config->db[
$type]->dbhost,
125 'user' => $this->config->db[
$type]->dbuser,
126 'password' => $this->config->db[
$type]->dbpass,
127 'database' => $this->config->db[
$type]->dbname,
129 }
else if (array_key_exists(
'dbhost', $this->config->db[
$type])) {
132 'host' => $this->config->db[
$type][
'dbhost'],
133 'user' => $this->config->db[
$type][
'dbuser'],
134 'password' => $this->config->db[
$type][
'dbpass'],
135 'database' => $this->config->db[
$type][
'dbname'],
137 }
else if (is_object(
current($this->config->db[
$type]))) {
139 $index = array_rand($this->config->db[
$type]);
141 'host' => $this->config->db[
$type][$index]->dbhost,
142 'user' => $this->config->db[
$type][$index]->dbuser,
143 'password' => $this->config->db[
$type][$index]->dbpass,
144 'database' => $this->config->db[
$type][$index]->dbname,
148 $index = array_rand($this->config->db[
$type]);
150 'host' => $this->config->db[
$type][$index][
'dbhost'],
151 'user' => $this->config->db[
$type][$index][
'dbuser'],
152 'password' => $this->config->db[
$type][$index][
'dbpass'],
153 'database' => $this->config->db[
$type][$index][
'dbname'],
getGeneralConnectionConfig()
Get the read/write database connection information.
__construct(\stdClass $config)
Constructor.
getConnectionConfig($type=self::READ_WRITE)
Get the connection configuration.
isQueryCacheEnabled()
Is the query cache enabled?
isDatabaseSplit()
Are the read and write connections separate?
getParticularConnectionConfig($type)
Get connection information for reading or writing.
getTablePrefix()
Get the database table prefix.
friends picker navigation li a current