Example #1
0
 /**
  *
  * This static method should initially be called with a configFile as parameter
  * When the method is called a second time, no configFiles is necessary as the
  * database object was created the first time, and will be returned.
  *
  * @param $configFile
  * @return Zend_Db_Adapter
  */
 public static function getInstance($configFile = null)
 {
     if (is_null(self::$onlyInstance)) {
         if ($configFile == null) {
             throw new Exception('Config file not provided to boostrap database.');
         }
         self::$onlyInstance = self::InitFromXMLConfig($configFile);
     }
     return self::$onlyInstance;
 }