示例#1
0
 public static function connection()
 {
     if (!($connection = self::$db)) {
         self::$db = new db();
         $connection = self::$db;
     }
     return $connection;
 }
示例#2
0
 public static function connection()
 {
   if (!$connection = self::$db) {
       self::$db = new db($GLOBALS['siteConfig']);
       $connection = self::$db;
   }
   
   return $connection;
 }