parse genres from tmdb
popup to add a new tag manually added some key props to prevent warnings
This commit is contained in:
@ -1,5 +1,10 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class Database
|
||||
*
|
||||
* Class with all neccessary stuff for the Database connections.
|
||||
*/
|
||||
class Database
|
||||
{
|
||||
private static ?Database $instance = null;
|
||||
@ -21,6 +26,12 @@ class Database
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* get an instance of this database class
|
||||
* (only possible way to retrieve an object)
|
||||
*
|
||||
* @return Database dbobject
|
||||
*/
|
||||
public static function getInstance()
|
||||
{
|
||||
if (!self::$instance) {
|
||||
@ -30,11 +41,20 @@ class Database
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* get a connection instance of the database
|
||||
*
|
||||
* @return mysqli mysqli instance
|
||||
*/
|
||||
public function getConnection()
|
||||
{
|
||||
return $this->conn;
|
||||
}
|
||||
|
||||
/**
|
||||
* get name of current active database
|
||||
* @return string name
|
||||
*/
|
||||
public function getDatabaseName(){
|
||||
return $this->dbname;
|
||||
}
|
||||
|
Reference in New Issue
Block a user