connection
if the adapter parameter is set this method acts as a short cut for Doctrine_Manager::getInstance()->openConnection($adapter, $name);
if the adapter paramater is not set this method acts as a short cut for Doctrine_Manager::getInstance()->getCurrentConnection()
Parameters:
API Tags:
Information Tags:
Throws: | Doctrine_Manager_Exception if trying to bind a connection with an existing name |
getInstance returns an instance of this class (this class uses the singleton pattern)
API Tags:
table this is the same as Doctrine_Connection::getTable() except that it works seamlessly in multi-server/connection environment
Parameters:
API Tags:
Doctrine_Manager __construct(
)
|
|
constructor
this is private constructor (use getInstance to get an instance of this class)
API Tags:
void addDeleteAction(
$componentName,
$foreignComponent,
$action
)
|
|
Parameters:
|
$componentName: |
|
|
$foreignComponent: |
|
|
$action: |
|
API Tags:
void addUpdateAction(
$componentName,
$foreignComponent,
$action
)
|
|
Parameters:
|
$componentName: |
|
|
$foreignComponent: |
|
|
$action: |
|
API Tags:
boolean bindComponent(
string
$componentName, string
$connectionName
)
|
|
bindComponent
binds given component to given connection this means that when ever the given component uses a connection it will be using the bound connection instead of the current connection
Parameters:
string |
$componentName: |
|
string |
$connectionName: |
|
API Tags:
closes the connection
Parameters:
API Tags:
boolean contains(
mixed
$key
)
|
|
contains whether or not the manager contains specified connection
Parameters:
mixed |
$key: |
the connection key |
API Tags:
count returns the number of opened connections
API Tags:
Implementation of:
- Countable::count
string getComponentAlias(
string
$componentName
)
|
|
getComponentAlias
retrieves the alias for given component name if the alias couldn't be found, this method returns the given component name
Parameters:
API Tags:
Return: | the component alias |
Access: | public |
getConnection
Parameters:
API Tags:
Information Tags:
Throws: | Doctrine_Manager_Exception if trying to get a non-existent connection |
getConnectionForComponent
Parameters:
API Tags:
getConnectionName
Parameters:
API Tags:
Return: | the name of the connection |
Access: | public |
getConnections returns all opened connections
API Tags:
getCurrentConnection returns the current connection
API Tags:
Information Tags:
Throws: | Doctrine_Connection_Exception if there are no open connections |
void getDeleteActions(
$componentName
)
|
|
Parameters:
API Tags:
ArrayIterator getIterator(
)
|
|
getIterator returns an ArrayIterator that iterates through all connections
API Tags:
Implementation of:
- IteratorAggregate::getIterator
returns the root directory of Doctrine
API Tags:
getTable this is the same as Doctrine_Connection::getTable() except that it works seamlessly in multi-server/connection environment
Parameters:
API Tags:
void getUpdateActions(
$componentName
)
|
|
Parameters:
API Tags:
openConnection opens a new connection and saves it to Doctrine_Manager->connections
Parameters:
PDO|Doctrine_Adapter_Interface |
$adapter: |
database driver |
string |
$name: |
name of the connection, if empty numeric key is used |
|
$setCurrent: |
|
API Tags:
Information Tags:
Throws: | Doctrine_Manager_Exception if trying to open connection for unknown driver |
Throws: | Doctrine_Manager_Exception if trying to bind a connection with an existing name |
array parseDsn(
string
$dsn
)
|
|
parseDsn
Parameters:
API Tags:
Return: | Parsed contents of DSN |
Access: | public |
sets an alias for given component name very useful when building a large framework with a possibility to override any given class
Parameters:
string |
$componentName: |
the name of the component |
string |
$alias: |
|
API Tags:
void setCurrentConnection(
mixed
$key
)
|
|
setCurrentConnection sets the current connection to $key
Parameters:
mixed |
$key: |
the connection key |
API Tags:
Information Tags:
Throws: | InvalidKeyException |
boolean setDefaultAttributes(
)
|
|
setDefaultAttributes sets default attributes
API Tags:
__toString returns a string representation of this object
API Tags: