PluginProbe
JetBackup – Backup, Restore & Migrate / 1.5.1
JetBackup – Backup, Restore & Migrate v1.5.1
3.1.23.6 3.1.23.5 3.1.23.3 3.1.22.4 3.1.22.3 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.8.1 1.4.9 1.5.0 1.5.1 1.5.1.1 1.5.2 1.5.3 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.0 1.6.10 All 82 releases
backup / com / core / database / SGDatabase.php
SGDatabase.php
34 lines 534 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 class SGDatabase
4 {
5 private static $instance = null;
6
7 public static function getInstance()
8 {
9 if (!self::$instance)
10 {
11 self::$instance = self::createAdapterInstance();
12 }
13
14 return self::$instance;
15 }
16
17 private static function createAdapterInstance()
18 {
19 $className = 'SGDatabaseAdapter'.SG_DB_ADAPTER;
20 require_once(SG_DATABASE_PATH.$className.'.php');
21 $adapter = new $className();
22 return $adapter;
23 }
24
25 private function __construct()
26 {
27
28 }
29
30 private function __clone()
31 {
32
33 }
34 }