/** * Return the global unique instance of DBConnector. * * @param string $sIncDir The base include path of the system. [optional, default=INC_DIR] * * @return DBConnector * * @throws Exception */ public static function getInstance() { if (!isset(self::$aInstances) || !self::$aInstances instanceof DBConnector) { self::$aInstances = new DBConnector(); } return self::$aInstances; }