36 return $this->config->dbprefix;
45 if (isset($this->config->db_disable_query_cache)) {
46 return !$this->config->db_disable_query_cache;
58 if (isset($this->config->db) && isset($this->config->db[
'split'])) {
59 return $this->config->db[
'split'];
63 if (isset($this->config->db) && isset($this->config->db->split)) {
64 return $this->config->db->split;
106 'host' => $this->config->dbhost,
107 'user' => $this->config->dbuser,
108 'password' => $this->config->dbpass,
109 'database' => $this->config->dbname,
120 if (is_object($this->config->db[
$type])) {
123 'host' => $this->config->db[
$type]->dbhost,
124 'user' => $this->config->db[
$type]->dbuser,
125 'password' => $this->config->db[
$type]->dbpass,
126 'database' => $this->config->db[
$type]->dbname,
128 }
else if (array_key_exists(
'dbhost', $this->config->db[
$type])) {
131 'host' => $this->config->db[
$type][
'dbhost'],
132 'user' => $this->config->db[
$type][
'dbuser'],
133 'password' => $this->config->db[
$type][
'dbpass'],
134 'database' => $this->config->db[
$type][
'dbname'],
136 }
else if (is_object(
current($this->config->db[
$type]))) {
138 $index = array_rand($this->config->db[
$type]);
140 'host' => $this->config->db[
$type][$index]->dbhost,
141 'user' => $this->config->db[
$type][$index]->dbuser,
142 'password' => $this->config->db[
$type][$index]->dbpass,
143 'database' => $this->config->db[
$type][$index]->dbname,
147 $index = array_rand($this->config->db[
$type]);
149 'host' => $this->config->db[
$type][$index][
'dbhost'],
150 'user' => $this->config->db[
$type][$index][
'dbuser'],
151 'password' => $this->config->db[
$type][$index][
'dbpass'],
152 'database' => $this->config->db[
$type][$index][
'dbname'],
__construct(stdClass $config)
Constructor.
getConnectionConfig($type=self::READ_WRITE)
Get the connection configuration.
getParticularConnectionConfig($type)
Get connection information for reading or writing.
isDatabaseSplit()
Are the read and write connections separate?
isQueryCacheEnabled()
Is the query cache enabled?
getTablePrefix()
Get the database table prefix.
getGeneralConnectionConfig()
Get the read/write database connection information.
friends picker navigation li a current