Elgg  Version 2.3
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 13 of file Config.php.

Constructor & Destructor Documentation

Elgg\Database\Config::__construct ( \stdClass  $config)

Constructor.

Parameters
\stdClass$configElgg's $CONFIG object

Definition at line 27 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 85 of file Config.php.

Elgg\Database\Config::getGeneralConnectionConfig ( )
protected

Get the read/write database connection information.

Returns
array

Definition at line 105 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 120 of file Config.php.

Elgg\Database\Config::getTablePrefix ( )

Get the database table prefix.

Returns
string

Definition at line 36 of file Config.php.

Elgg\Database\Config::isDatabaseSplit ( )

Are the read and write connections separate?

Returns
bool

Definition at line 58 of file Config.php.

Elgg\Database\Config::isQueryCacheEnabled ( )

Is the query cache enabled?

Returns
bool

Definition at line 45 of file Config.php.

Member Data Documentation

Elgg\Database\Config::$config
protected

Definition at line 20 of file Config.php.

const Elgg\Database\Config::READ = 'read'

Definition at line 15 of file Config.php.

const Elgg\Database\Config::READ_WRITE = 'readwrite'

Definition at line 17 of file Config.php.

const Elgg\Database\Config::WRITE = 'write'

Definition at line 16 of file Config.php.


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