. */ /** * Doctrine_Config * * Class used to simplify the setup and configuration of a doctrine implementation. * * @package Doctrine * @subpackage Config * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.phpdoctrine.com * @since 1.0 * @version $Revision: 2753 $ * @author Konsta Vesterinen * @author Jonathan H. Wage */ class Doctrine_Config { protected $connections = array(); protected $cliConfig = array(); /** * addConnection * * @param string $adapter * @param string $name * @return void */ public function addConnection($adapter, $name = null) { $connections[] = Doctrine_Manager::getInstance()->openConnection($adapter, $name); } /** * bindComponent * * @param string $modelName * @param string $connectionName * @return void */ public function bindComponent($modelName, $connectionName) { return Doctrine_Manager::getInstance()->bindComponent($modelName, $connectionName); } /** * setAttribute * * @param string $key * @param string $value * @return void */ public function setAttribute($key, $value) { foreach ($this->connections as $connection) { $connection->setAttribute($key, $value); } } /** * addCliConfig * * @param string $key * @param string $value * @return void */ public function addCliConfig($key, $value) { $this->cliConfig[$key] = $value; } /** * getCliConfig * * @return void */ public function getCliConfig() { return $this->cliConfig; } }