symfony API

sfDatabaseManager Class

« Back to API menu

1.1 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.1 version. Switch to:
This version of symfony is not maintained anymore.
If some of your projects still use this version, consider upgrading as soon as possible.

sfDatabaseManager allows you to setup your database connectivity before the

Method Summary

  • mixed getDatabase($name)
    Retrieves the database connection associated with this sfDatabase implementation.
  • array getNames()
    Returns the names of all database connections.
  • bool initialize($configuration)
    Initializes this sfDatabaseManager object
  • loadConfiguration()
    Loads database configuration.
  • setDatabase($name, $sfDatabase)
    Sets a database connection.
  • void shutdown()
    Executes the shutdown procedure
  • __construct()
    Class constructor.

Method Details

  • (mixed) getDatabase ($name) Browse code

    $name A database name

    Retrieves the database connection associated with this sfDatabase implementation.

    returns A Database instance

    throws sfDatabaseException If the requested database name does not exist

  • (array) getNames () Browse code

    Returns the names of all database connections.

    returns An array containing all database connection names

  • (bool) initialize ($configuration) Browse code

    $configuration A sfApplicationConfiguration instance

    Initializes this sfDatabaseManager object

    returns true, if initialization completes successfully, otherwise false

    throws sfInitializationException If an error occurs while initializing this sfDatabaseManager object

  • loadConfiguration () Browse code

    Loads database configuration.

  • setDatabase ($name, $sfDatabase) Browse code

    $name The database name
    $sfDatabase A sfDatabase instance

    Sets a database connection.

  • (void) shutdown () Browse code

    Executes the shutdown procedure

    throws sfDatabaseException If an error occurs while shutting down this DatabaseManager

  • __construct () Browse code

    Class constructor.

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.