symfony API

sfDatabaseManager Class

« Back to API menu

1.0 API OpenSearch

Packages

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

sfDatabaseManager allows you to setup your database connectivity before the request is handled. This eliminates the need for a filter to manage database connections.

Method Summary

  • shutdown()
    Executes the shutdown procedure
  • bool initialize()
    Initializes this sfDatabaseManager object
  • mixed getDatabase($name = 'default')
    Retrieves the database connection associated with this sfDatabase implementation.

Method Details

  • shutdown () Browse code

    Executes the shutdown procedure

    throws sfDatabaseException If an error occurs while shutting down this DatabaseManager

  • (bool) initialize () Browse code

    Initializes this sfDatabaseManager object

    returns true, if initialization completes successfully, otherwise false

    throws sfInitializationException If an error occurs while initializing this sfDatabaseManager object

  • (mixed) getDatabase ($name = 'default') 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

The Sensio Labs Network

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