-
__construct ($parameters = array())
Class constructor.
-
shutdown ()
Executes the shutdown procedure.
throws sfDatabaseException If an error occurs while shutting down this database
-
(boolean) hasParameter ($name)
Returns true if the given key exists in the parameter holder.
This is a shortcut for:
$this->getParameterHolder()->has()
returns true if the given key exists, false otherwise
-
(string) getParameter ($name, $default = null)
| $name |
The key name |
| $default |
The default value |
Gets the parameter associated with the given key.
This is a shortcut for:
$this->getParameterHolder()->get()
returns The value associated with the key
-
connect ()
Connects to the database.
throws sfDatabaseException If a connection could not be created
-
(bool) initialize ($parameters = array())
| $parameters |
An associative array of initialization parameters |
Initializes this sfDatabase object.
returns true, if initialization completes successfully, otherwise false
throws sfInitializationException If an error occurs while initializing this sfDatabase object
-
(mixed) getResource ()
Retrieves a raw database resource associated with this sfDatabase
implementation.
returns A database resource
throws sfDatabaseException If a resource could not be retrieved
-
getParameterHolder ()
Gets the parameter holder for this object.
returns A sfParameterHolder instance
-
(mixed) getConnection ()
Retrieves the database connection associated with this sfDatabase
implementation.
When this is executed on a Database implementation that isn't an abstraction layer, a copy of the resource will be returned.
returns A database connection
throws sfDatabaseException If a connection could not be retrieved
-
setParameter ($name, $value)
| $name |
The key name |
| $value |
The value |
Sets the value for the given key.
This is a shortcut for:
$this->getParameterHolder()->set()