symfony API

sfDatabaseManager Class

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to API menu

1.4 API OpenSearch

Packages

You are currently browsing the symfony API for the 1.4 version. Switch to:

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, $database)
    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 sfProjectConfiguration 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, $database) Browse code

    $name The database name
    $database 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.