forked from flashii/eeprom
Use self:: instead of static::.
This commit is contained in:
parent
245878f7f8
commit
5ab496b833
1 changed files with 4 additions and 4 deletions
|
@ -11,8 +11,8 @@ class MisuzuAuth implements AuthInterface {
|
||||||
private static $database = null;
|
private static $database = null;
|
||||||
|
|
||||||
public function getDatabase(): PDO {
|
public function getDatabase(): PDO {
|
||||||
if(static::$database !== null)
|
if(self::$database !== null)
|
||||||
return static::$database;
|
return self::$database;
|
||||||
|
|
||||||
$configPath = Config::get('Misuzu', 'config', '');
|
$configPath = Config::get('Misuzu', 'config', '');
|
||||||
|
|
||||||
|
@ -32,12 +32,12 @@ class MisuzuAuth implements AuthInterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
static::$database = new PDO($dsn, $config['username'], $config['password'], DB::FLAGS);
|
self::$database = new PDO($dsn, $config['username'], $config['password'], DB::FLAGS);
|
||||||
} catch(PDOException $ex) {
|
} catch(PDOException $ex) {
|
||||||
throw new \Exception('Unable to connect to Misuzu database.');
|
throw new \Exception('Unable to connect to Misuzu database.');
|
||||||
}
|
}
|
||||||
|
|
||||||
return static::$database;
|
return self::$database;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(): string { return 'Misuzu'; }
|
public function getName(): string { return 'Misuzu'; }
|
||||||
|
|
Loading…
Reference in a new issue