WARNING: API IN FLUX.
More...
WARNING: API IN FLUX.
DO NOT USE DIRECTLY.
Definition at line 13 of file DbConfig.php.
Elgg\Database\DbConfig::__construct |
( |
\stdClass |
$config | ) |
|
Constructor.
- Parameters
-
\stdClass | $config | Object with keys: db dbprefix dbhost dbuser dbpass dbname dbencoding |
Definition at line 39 of file DbConfig.php.
static Elgg\Database\DbConfig::fromElggConfig |
( |
Config |
$config | ) |
|
|
static |
Elgg\Database\DbConfig::getConnectionConfig |
( |
|
$type = self::READ_WRITE | ) |
|
Get the connection configuration.
- Note
- You must check isDatabaseSplit before using READ or WRITE for $type
The parameters are in an array like this: array( 'host' => 'xxx', 'user' => 'xxx', 'password' => 'xxx', 'database' => 'xxx', 'encoding' => 'xxx', 'prefix' => 'xxx', )
- Parameters
-
string | $type | The connection type: READ, WRITE, READ_WRITE |
- Returns
- array
Definition at line 105 of file DbConfig.php.
Elgg\Database\DbConfig::getGeneralConnectionConfig |
( |
| ) |
|
|
protected |
Get the read/write database connection information.
- Returns
- array
Definition at line 127 of file DbConfig.php.
Elgg\Database\DbConfig::getParticularConnectionConfig |
( |
|
$type | ) |
|
|
protected |
Get connection information for reading or writing.
- Parameters
-
string | $type | Connection type: 'write' or 'read' |
- Returns
- array
Definition at line 142 of file DbConfig.php.
Elgg\Database\DbConfig::getTablePrefix |
( |
| ) |
|
Get the database table prefix.
- Returns
- string
Definition at line 65 of file DbConfig.php.
Elgg\Database\DbConfig::isDatabaseSplit |
( |
| ) |
|
Are the read and write connections separate?
- Returns
- bool
Definition at line 74 of file DbConfig.php.
Elgg\Database\DbConfig::$db |
|
protected |
Elgg\Database\DbConfig::$dbencoding |
|
protected |
Elgg\Database\DbConfig::$dbhost |
|
protected |
Elgg\Database\DbConfig::$dbname |
|
protected |
Elgg\Database\DbConfig::$dbpass |
|
protected |
Elgg\Database\DbConfig::$dbprefix |
|
protected |
Elgg\Database\DbConfig::$dbuser |
|
protected |
const Elgg\Database\DbConfig::READ = 'read' |
const Elgg\Database\DbConfig::READ_WRITE = 'readwrite' |
const Elgg\Database\DbConfig::WRITE = 'write' |
The documentation for this class was generated from the following file: