docs: Improve documentation and translate comments to English

This commit is contained in:
kj
2025-10-10 21:18:22 -03:00
parent 674c9d5ff4
commit 7f62e06ff9
8 changed files with 369 additions and 307 deletions

View File

@@ -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',