예제 #1
0
 public static function getInstance()
 {
     if (self::$instance === null) {
         trigger_error('Mysql class not initialised!', E_USER_ERROR);
     } else {
         if (!self::$opened) {
             self::$opened = true;
             self::$instance->open();
         }
         return self::$instance;
     }
 }