Changeset 2089
- Timestamp:
- 09/21/07 17:18:23 (16 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/0.11/src/database/AgaviDoctrineDatabase.class.php
r2086 r2089 80 80 parent::initialize($databaseManager, $parameters); 81 81 82 $name = $this->getName(); 83 82 84 // try to autoload doctrine 83 85 if(!class_exists('Doctrine')) { … … 106 108 } 107 109 108 $this->connection = $this->doctrineManager->openConnection($dsn, $ this->getName());110 $this->connection = $this->doctrineManager->openConnection($dsn, $name); 109 111 // do not assign the resource here. that would connect to the database 110 112 // $this->resource = $this->connection->getDbh(); 113 114 foreach((array)$this->getParameter('attributes', array()) as $attributeName => $attributeValue) { 115 $this->connection->setAttribute($attributeName, $attributeValue); 116 } 117 118 foreach((array)$this->getParameter('bind_components', array()) as $componentName) { 119 $this->doctrineManager->bindComponent($componentName, $name); 120 } 111 121 } catch(Doctrine_Exception $e) { 112 122 // the connection's foobar'd

