- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
class ConnectDB {
protected static $_instance;
private function __construct() {
$this->DB = new DBConnector();
}
private function __clone() {}
private function __wakeup() {}
public static function getInstance() {
if (empty(self::$instance)) {
self::$_instance = new self;
}
return self::$_instance;
}
}
Her 10.02.2016 19:36 # −1
1024-- 10.02.2016 20:33 # +2
guest 23.02.2016 21:57 # −1
Patriarh_Kirill 23.02.2016 21:59 # 0