Development

Changeset 7442

You must first sign up to be able to contribute.

Changeset 7442

Show
Ignore:
Timestamp:
02/09/08 20:55:48 (8 months ago)
Author:
fabien
Message:

added sfDatabaseManager::setDatabase()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/config/sfDatabaseConfigHandler.class.php

    r6805 r7442  
    9696 
    9797      // append new data 
    98       $data[] = sprintf("\n\$this->databases['%s'] = new %s(%s);", $name, $dbConfig['class'], var_export($parameters, true)); 
     98      $data[] = sprintf("\n\$this->setDatabase('%s', new %s(%s));", $name, $dbConfig['class'], var_export($parameters, true)); 
    9999    } 
    100100 
  • branches/1.1/lib/database/sfDatabaseManager.class.php

    r6724 r7442  
    6262 
    6363  /** 
     64   * Sets a database connection. 
     65   * 
     66   * @param string     The database name 
     67   * @param sfDatabase A sfDatabase instance 
     68   */ 
     69  public function setDatabase($name, sfDatabase $database) 
     70  { 
     71    $this->databases[$name] = $database; 
     72  } 
     73 
     74  /** 
    6475   * Retrieves the database connection associated with this sfDatabase implementation. 
    6576   *