ConnectionManager Class Reference

Inheritance diagram for ConnectionManager:

Object

List of all members.


Public Member Functions

create ($name= '', $config=array())
 enumConnectionObjects ()
getDataSource ($name)
getInstance ()
 getSourceName (&$source)
 loadDataSource ($connName)

Public Attributes

 $_connectionsEnum = array()
 $_dataSources = array()
 $config = null

Detailed Description

Definition at line 43 of file connection_manager.php.


Member Function Documentation

& ConnectionManager::create ( name = '',
config = array() 
)

Dynamically creates a DataSource object at runtime, with the given name and settings

Parameters:
string $name The DataSource name
array $config The DataSource configuration settings
Returns:
object A reference to the DataSource object, or null if creation failed

Definition at line 197 of file connection_manager.php.

References $config, and getInstance().

ConnectionManager::enumConnectionObjects (  ) 

Gets a list of class and file names associated with the user-defined DataSource connections

Returns:
array An associative array of elements where the key is the connection name (as defined in Connections), and the value is an array with keys 'filename' and 'classname'.

Definition at line 173 of file connection_manager.php.

References $config, and getInstance().

& ConnectionManager::getInstance (  ) 

Gets a reference to the ConnectionManger object instance

Returns:
object

Definition at line 80 of file connection_manager.php.

Referenced by create(), enumConnectionObjects(), getDataSource(), getSourceName(), and loadDataSource().

ConnectionManager::getSourceName ( &$  source  ) 

Gets a DataSource name from an object reference

Parameters:
object $source
Returns:
string

Definition at line 122 of file connection_manager.php.

References getInstance().

Referenced by DataSource::listSources().

ConnectionManager::loadDataSource ( connName  ) 

Loads the DataSource class for the given connection name

Parameters:
mixed $connName A string name of the connection, as defined in Connections config, or an array containing the file and class name of the object.
Returns:
boolean True on success, null on failure or false if the class is already loaded

Definition at line 140 of file connection_manager.php.

References getInstance().


Member Data Documentation

ConnectionManager::$_connectionsEnum = array()

Definition at line 65 of file connection_manager.php.

ConnectionManager::$_dataSources = array()

Definition at line 58 of file connection_manager.php.

ConnectionManager::$config = null

Definition at line 51 of file connection_manager.php.


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