예제 #1
0
파일: DBALite.php 프로젝트: paulyg/dbalite
 /**
  * Return a singleton connection instance.
  *
  * If a singleton instance has not been created yet it will be created for you.
  *
  * @see    DBALite::factory()
  * @param  string $driver Needed on first call only.
  * @param  array  $config Needed on first call only.
  * @return DBALite_DriverAbstract
  */
 public static function getSingleton($driver = '', $config = null)
 {
     if (is_null(self::$singleton)) {
         self::$singleton = self::factory($driver, $config);
     }
     return self::$singleton;
 }