1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-12 09:34:10 +02:00

PHP: Use namespace

This commit is contained in:
Jakub Vrana
2025-03-05 11:28:53 +01:00
parent 5a708df6ca
commit 52c5392089
111 changed files with 230 additions and 20 deletions

View File

@@ -1,4 +1,6 @@
<?php
namespace Adminer;
$drivers["mongo"] = "MongoDB (alpha)";
if (isset($_GET["mongo"])) {

View File

@@ -5,6 +5,8 @@
* @author Jakub Vrana
*/
namespace Adminer;
$drivers["mssql"] = "MS SQL";
if (isset($_GET["mssql"])) {

View File

@@ -1,11 +1,13 @@
<?php
namespace Adminer;
$drivers = array("server" => "MySQL") + $drivers;
if (!defined("DRIVER")) {
define("DRIVER", "server"); // server - backwards compatibility
// MySQLi supports everything, MySQL doesn't support multiple result sets, PDO_MySQL doesn't support orgtable
if (extension_loaded("mysqli")) {
class Min_DB extends MySQLi {
class Min_DB extends \MySQLi {
var $extension = "MySQLi";
function __construct() {

View File

@@ -1,4 +1,6 @@
<?php
namespace Adminer;
$drivers["oracle"] = "Oracle (beta)";
if (isset($_GET["oracle"])) {

View File

@@ -1,4 +1,6 @@
<?php
namespace Adminer;
$drivers["pgsql"] = "PostgreSQL";
if (isset($_GET["pgsql"])) {

View File

@@ -1,4 +1,6 @@
<?php
namespace Adminer;
$drivers["sqlite"] = "SQLite";
if (isset($_GET["sqlite"])) {
@@ -9,7 +11,7 @@ if (isset($_GET["sqlite"])) {
var $extension = "SQLite3", $server_info, $affected_rows, $errno, $error, $_link;
function __construct($filename) {
$this->_link = new SQLite3($filename);
$this->_link = new \SQLite3($filename);
$version = $this->_link->version();
$this->server_info = $version["versionString"];
}
@@ -90,7 +92,7 @@ if (isset($_GET["sqlite"])) {
}
if (class_exists("Min_SQLite")) {
if (class_exists('Adminer\Min_SQLite')) {
class Min_DB extends Min_SQLite {
function __construct() {