docs: Improve documentation and translate comments to English
This commit is contained in:
@@ -9,24 +9,28 @@ use PDOException;
|
||||
/**
|
||||
* Database - DuckBrain
|
||||
*
|
||||
* Clase diseñada para crear y devolver una única instancia PDO (database).
|
||||
* Class designed to create and return a single PDO instance (database).
|
||||
*
|
||||
* @author KJ
|
||||
* @website https://kj2.me
|
||||
* @licence MIT
|
||||
* @license MIT
|
||||
*/
|
||||
class Database extends PDO
|
||||
{
|
||||
private static array $databases = [];
|
||||
|
||||
/**
|
||||
* Private constructor to prevent direct instantiation.
|
||||
*/
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Devuelve una instancia homogénea (singlenton) de la base de datos (PDO).
|
||||
* Returns a homogeneous (singleton) instance of the database (PDO).
|
||||
*
|
||||
* @return PDO
|
||||
* @throws Exception If there is an error connecting to the database.
|
||||
*/
|
||||
public static function getInstance(
|
||||
string $type = 'mysql',
|
||||
|
||||
Reference in New Issue
Block a user