searchPath(array('config', 'db')); if ($dsns === FALSE) throw new Example_Config_Exception( 'Unable to find config/db section in configuration.' ); $dsns =& $dsns->toArray(); foreach($dsns as $dsn) { try { $this->connectDB($dsn); return; } catch (Example_Datasource_Exception e) { // Warn-/Logging-Code um den Verbindungsfehler // aufzuzeichnen } } throw new Example_Datasource_Exception( 'Unable to connect to any of the configured databases' ); } ?>