Elgg  Version 1.9
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Elgg_Database_Config Class Reference

Public Member Functions

 __construct (stdClass $config)
 Constructor. More...
 
 getTablePrefix ()
 Get the database table prefix. More...
 
 isQueryCacheEnabled ()
 Is the query cache enabled? More...
 
 isDatabaseSplit ()
 Are the read and write connections separate? More...
 
 getConnectionConfig ($type=self::READ_WRITE)
 Get the connection configuration. More...
 

Public Attributes

const READ = 'read'
 
const WRITE = 'write'
 
const READ_WRITE = 'readwrite'
 

Protected Member Functions

 getGeneralConnectionConfig ()
 Get the read/write database connection information. More...
 
 getParticularConnectionConfig ($type)
 Get connection information for reading or writing. More...
 

Protected Attributes

 $config
 

Detailed Description

Definition at line 12 of file Config.php.

Constructor & Destructor Documentation

Elgg_Database_Config::__construct ( stdClass  $config)

Constructor.

Parameters
stdClass$configElgg's $CONFIG object

Definition at line 26 of file Config.php.

Member Function Documentation

Elgg_Database_Config::getConnectionConfig (   $type = self::READ_WRITE)

Get the connection configuration.

The parameters are in an array like this: array( 'host' => 'xxx', 'user' => 'xxx', 'password' => 'xxx', 'database' => 'xxx', )

Parameters
int$typeThe connection type: READ, WRITE, READ_WRITE
Returns
array

Definition at line 84 of file Config.php.

Elgg_Database_Config::getGeneralConnectionConfig ( )
protected

Get the read/write database connection information.

Returns
array

Definition at line 104 of file Config.php.

Elgg_Database_Config::getParticularConnectionConfig (   $type)
protected

Get connection information for reading or writing.

Parameters
string$typeConnection type: 'write' or 'read'
Returns
array

Definition at line 119 of file Config.php.

Elgg_Database_Config::getTablePrefix ( )

Get the database table prefix.

Returns
string

Definition at line 35 of file Config.php.

Elgg_Database_Config::isDatabaseSplit ( )

Are the read and write connections separate?

Returns
bool

Definition at line 57 of file Config.php.

Elgg_Database_Config::isQueryCacheEnabled ( )

Is the query cache enabled?

Returns
bool

Definition at line 44 of file Config.php.

Member Data Documentation

Elgg_Database_Config::$config
protected

Definition at line 19 of file Config.php.

const Elgg_Database_Config::READ = 'read'

Definition at line 14 of file Config.php.

const Elgg_Database_Config::READ_WRITE = 'readwrite'

Definition at line 16 of file Config.php.

const Elgg_Database_Config::WRITE = 'write'

Definition at line 15 of file Config.php.


The documentation for this class was generated from the following file: