From b1d7cce0559695fbe36a971055487927fcea8f85 Mon Sep 17 00:00:00 2001 From: "Bruno O. Notario" Date: Mon, 4 Mar 2024 20:45:20 -0300 Subject: [PATCH] Rename db drivers namespace --- system/database/Databases/Driver/DBMySQLi.php | 2 +- system/database/Databases/Driver/MSSQL.php | 2 +- system/database/Databases/Driver/MySQL.php | 2 +- system/database/Databases/Driver/MySQL_PDO.php | 2 +- system/database/Databases/Driver/MySQL_legacy.php | 2 +- system/database/Databases/Driver/MySQLi.php | 2 +- system/database/Databases/Driver/Oracle.php | 2 +- system/database/Databases/Driver/Oracle_PDO.php | 2 +- system/database/Databases/Driver/Postgre.php | 2 +- system/database/Databases/Driver/SQLSRV.php | 2 +- system/database/Databases/Driver/SQLite3.php | 2 +- system/database/Databases/Driver/mPDO.php | 2 +- .../database/Databases/Driver/nullStatement.php | 2 +- system/database/Databases/Driver/sqlsrvPDO.php | 2 +- system/engine/api/database.php | 15 ++++----------- 15 files changed, 18 insertions(+), 25 deletions(-) diff --git a/system/database/Databases/Driver/DBMySQLi.php b/system/database/Databases/Driver/DBMySQLi.php index 151c0ca..c8f481f 100644 --- a/system/database/Databases/Driver/DBMySQLi.php +++ b/system/database/Databases/Driver/DBMySQLi.php @@ -6,7 +6,7 @@ * Phacil PHP Framework - https://github.com/exacti/phacil-framework */ -namespace Phacil\Framework\Databases; +namespace Phacil\Framework\Databases\Driver; final class DBMySQLi extends MySQLi { diff --git a/system/database/Databases/Driver/MSSQL.php b/system/database/Databases/Driver/MSSQL.php index 0c605f1..5748b36 100644 --- a/system/database/Databases/Driver/MSSQL.php +++ b/system/database/Databases/Driver/MSSQL.php @@ -6,7 +6,7 @@ * Phacil PHP Framework - https://github.com/exacti/phacil-framework */ -namespace Phacil\Framework\Databases; +namespace Phacil\Framework\Databases\Driver; /** * Legacy class to connect a MS SQL Server with PHP 5 legacy driver. diff --git a/system/database/Databases/Driver/MySQL.php b/system/database/Databases/Driver/MySQL.php index c5410cc..f1634f4 100644 --- a/system/database/Databases/Driver/MySQL.php +++ b/system/database/Databases/Driver/MySQL.php @@ -6,7 +6,7 @@ * Phacil PHP Framework - https://github.com/exacti/phacil-framework */ -namespace Phacil\Framework\Databases; +namespace Phacil\Framework\Databases\Driver; /** * Adaptation to use MySQLi instead MySQL Legacy driver diff --git a/system/database/Databases/Driver/MySQL_PDO.php b/system/database/Databases/Driver/MySQL_PDO.php index 99631e7..473c780 100644 --- a/system/database/Databases/Driver/MySQL_PDO.php +++ b/system/database/Databases/Driver/MySQL_PDO.php @@ -6,7 +6,7 @@ * Phacil PHP Framework - https://github.com/exacti/phacil-framework */ -namespace Phacil\Framework\Databases; +namespace Phacil\Framework\Databases\Driver\Driver; use Phacil\Framework\Databases\Api\DriverInterface as DatabasesDriver; diff --git a/system/database/Databases/Driver/MySQL_legacy.php b/system/database/Databases/Driver/MySQL_legacy.php index 3dd1cbc..0055938 100644 --- a/system/database/Databases/Driver/MySQL_legacy.php +++ b/system/database/Databases/Driver/MySQL_legacy.php @@ -6,7 +6,7 @@ * Phacil PHP Framework - https://github.com/exacti/phacil-framework */ -namespace Phacil\Framework\Databases; +namespace Phacil\Framework\Databases\Driver; /** * Legacy class to connect a MySQL with PHP 5 legacy driver. diff --git a/system/database/Databases/Driver/MySQLi.php b/system/database/Databases/Driver/MySQLi.php index 1a235c8..5c0f716 100644 --- a/system/database/Databases/Driver/MySQLi.php +++ b/system/database/Databases/Driver/MySQLi.php @@ -6,7 +6,7 @@ * Phacil PHP Framework - https://github.com/exacti/phacil-framework */ -namespace Phacil\Framework\Databases; +namespace Phacil\Framework\Databases\Driver; use MySQLi as GlobalMysqli; use Phacil\Framework\Databases\Api\DriverInterface; diff --git a/system/database/Databases/Driver/Oracle.php b/system/database/Databases/Driver/Oracle.php index c550027..d71c675 100644 --- a/system/database/Databases/Driver/Oracle.php +++ b/system/database/Databases/Driver/Oracle.php @@ -6,7 +6,7 @@ * Phacil PHP Framework - https://github.com/exacti/phacil-framework */ -namespace Phacil\Framework\Databases; +namespace Phacil\Framework\Databases\Driver; use Phacil\Framework\Databases\Api\DriverInterface as Databases; diff --git a/system/database/Databases/Driver/Oracle_PDO.php b/system/database/Databases/Driver/Oracle_PDO.php index 837655c..988a1b3 100644 --- a/system/database/Databases/Driver/Oracle_PDO.php +++ b/system/database/Databases/Driver/Oracle_PDO.php @@ -6,7 +6,7 @@ * Phacil PHP Framework - https://github.com/exacti/phacil-framework */ -namespace Phacil\Framework\Databases; +namespace Phacil\Framework\Databases\Driver; use PDO; use Phacil\Framework\Databases\Api\DriverInterface; diff --git a/system/database/Databases/Driver/Postgre.php b/system/database/Databases/Driver/Postgre.php index 2f38c68..f003773 100644 --- a/system/database/Databases/Driver/Postgre.php +++ b/system/database/Databases/Driver/Postgre.php @@ -6,7 +6,7 @@ * Phacil PHP Framework - https://github.com/exacti/phacil-framework */ -namespace Phacil\Framework\Databases; +namespace Phacil\Framework\Databases\Driver; use Phacil\Framework\Databases\Api\DriverInterface; diff --git a/system/database/Databases/Driver/SQLSRV.php b/system/database/Databases/Driver/SQLSRV.php index 7e88f0f..d275310 100644 --- a/system/database/Databases/Driver/SQLSRV.php +++ b/system/database/Databases/Driver/SQLSRV.php @@ -6,7 +6,7 @@ * Phacil PHP Framework - https://github.com/exacti/phacil-framework */ -namespace Phacil\Framework\Databases; +namespace Phacil\Framework\Databases\Driver; use Phacil\Framework\Databases\Api\DriverInterface; diff --git a/system/database/Databases/Driver/SQLite3.php b/system/database/Databases/Driver/SQLite3.php index af8cc28..d181e5a 100644 --- a/system/database/Databases/Driver/SQLite3.php +++ b/system/database/Databases/Driver/SQLite3.php @@ -6,7 +6,7 @@ * Phacil PHP Framework - https://github.com/exacti/phacil-framework */ -namespace Phacil\Framework\Databases; +namespace Phacil\Framework\Databases\Driver; use Phacil\Framework\Databases\Api\DriverInterface; use \SQLite3 as nativeSQLite3; diff --git a/system/database/Databases/Driver/mPDO.php b/system/database/Databases/Driver/mPDO.php index 8c59a4e..4dd9ba0 100644 --- a/system/database/Databases/Driver/mPDO.php +++ b/system/database/Databases/Driver/mPDO.php @@ -6,7 +6,7 @@ * Phacil PHP Framework - https://github.com/exacti/phacil-framework */ -namespace Phacil\Framework\Databases; +namespace Phacil\Framework\Databases\Driver; use PDO; use Phacil\Framework\Databases\Api\DriverInterface; diff --git a/system/database/Databases/Driver/nullStatement.php b/system/database/Databases/Driver/nullStatement.php index 83e401c..1496593 100644 --- a/system/database/Databases/Driver/nullStatement.php +++ b/system/database/Databases/Driver/nullStatement.php @@ -6,7 +6,7 @@ * Phacil PHP Framework - https://github.com/exacti/phacil-framework */ -namespace Phacil\Framework\Databases; +namespace Phacil\Framework\Databases\Driver; use Phacil\Framework\Databases\Api\DriverInterface; diff --git a/system/database/Databases/Driver/sqlsrvPDO.php b/system/database/Databases/Driver/sqlsrvPDO.php index 9a33946..9b4d24b 100644 --- a/system/database/Databases/Driver/sqlsrvPDO.php +++ b/system/database/Databases/Driver/sqlsrvPDO.php @@ -6,7 +6,7 @@ * Phacil PHP Framework - https://github.com/exacti/phacil-framework */ -namespace Phacil\Framework\Databases; +namespace Phacil\Framework\Databases\Driver; use \PDO as PDONative; use Phacil\Framework\Databases\Api\DriverInterface; diff --git a/system/engine/api/database.php b/system/engine/api/database.php index 48f3b0a..1f42f0e 100644 --- a/system/engine/api/database.php +++ b/system/engine/api/database.php @@ -34,13 +34,6 @@ interface Database { **/ public function isConnected(); - /** - * Destroy the connection - * - * @return void - */ - public function __destruct(); - /** * Execute the SQL Query * @@ -88,11 +81,11 @@ interface Database { public function pagination($sql, $pageNum_exibe = 1, $maxRows_exibe = 10, $cache = true, $sqlTotal = null); /** - * @param string $nome - * @param object $object - * @return void + * @param string $name + * @param \Phacil\Framework\Api\Database $object + * @return $this */ - public function createSubBase($nome, $object); + public function createSubBase($name, \Phacil\Framework\Api\Database $object); /** * Execute a prepared statement with parameters