Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 3.140.201.179
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
wb /
vendor /
doctrine /
doctrine-bundle /
Delete
Unzip
Name
Size
Permission
Date
Action
Attribute
[ DIR ]
drwxrwxr-x
2022-06-10 10:55
CacheWarmer
[ DIR ]
drwxrwxr-x
2022-06-10 10:55
Command
[ DIR ]
drwxrwxr-x
2022-06-10 10:55
Controller
[ DIR ]
drwxrwxr-x
2022-06-10 10:55
DataCollector
[ DIR ]
drwxrwxr-x
2022-06-10 10:55
Dbal
[ DIR ]
drwxrwxr-x
2022-06-10 10:55
DependencyInjection
[ DIR ]
drwxrwxr-x
2022-06-10 10:55
EventSubscriber
[ DIR ]
drwxrwxr-x
2022-06-10 10:55
Mapping
[ DIR ]
drwxrwxr-x
2022-06-10 10:55
Middleware
[ DIR ]
drwxrwxr-x
2022-06-10 10:55
Orm
[ DIR ]
drwxrwxr-x
2022-06-10 10:55
Repository
[ DIR ]
drwxrwxr-x
2022-06-10 10:55
Resources
[ DIR ]
drwxrwxr-x
2022-06-10 10:55
Twig
[ DIR ]
drwxrwxr-x
2022-06-10 10:55
.doctrine-project.json
2.35
KB
-rw-rw-r--
2022-06-10 10:55
.symfony.bundle.yaml
147
B
-rw-rw-r--
2022-06-10 10:55
ConnectionFactory.php
7.25
KB
-rw-rw-r--
2022-06-10 10:55
DoctrineBundle.php
6.72
KB
-rw-rw-r--
2022-06-10 10:55
LICENSE
1.05
KB
-rw-rw-r--
2022-06-10 10:55
ManagerConfigurator.php
1.84
KB
-rw-rw-r--
2022-06-10 10:55
README.md
1.54
KB
-rw-rw-r--
2022-06-10 10:55
Registry.php
2.42
KB
-rw-rw-r--
2022-06-10 10:55
UPGRADE-1.11.md
1.07
KB
-rw-rw-r--
2022-06-10 10:55
UPGRADE-1.12.md
2.44
KB
-rw-rw-r--
2022-06-10 10:55
UPGRADE-2.0.md
3.74
KB
-rw-rw-r--
2022-06-10 10:55
UPGRADE-2.1.md
2.36
KB
-rw-rw-r--
2022-06-10 10:55
UPGRADE-2.2.md
530
B
-rw-rw-r--
2022-06-10 10:55
UPGRADE-2.3.md
774
B
-rw-rw-r--
2022-06-10 10:55
UPGRADE-2.4.md
402
B
-rw-rw-r--
2022-06-10 10:55
UPGRADE-2.5.md
147
B
-rw-rw-r--
2022-06-10 10:55
UPGRADE-2.6.md
154
B
-rw-rw-r--
2022-06-10 10:55
UPGRADE-3.0.md
152
B
-rw-rw-r--
2022-06-10 10:55
composer.json
2.94
KB
-rw-rw-r--
2022-06-10 10:55
phpcs.xml.dist
1.27
KB
-rw-rw-r--
2022-06-10 10:55
psalm.xml.dist
2.25
KB
-rw-rw-r--
2022-06-10 10:55
Save
Rename
<?php namespace Doctrine\Bundle\DoctrineBundle; use Doctrine\Common\EventManager; use Doctrine\DBAL\Configuration; use Doctrine\DBAL\Connection; use Doctrine\DBAL\DriverManager; use Doctrine\DBAL\Exception as DBALException; use Doctrine\DBAL\Exception\DriverException; use Doctrine\DBAL\Platforms\AbstractMySQLPlatform; use Doctrine\DBAL\Platforms\AbstractPlatform; use Doctrine\DBAL\Platforms\MySqlPlatform; use Doctrine\DBAL\Types\Type; use Doctrine\Deprecations\Deprecation; use function array_merge; use function defined; use function is_subclass_of; use function trigger_deprecation; use const PHP_EOL; /** @psalm-import-type Params from DriverManager */ class ConnectionFactory { /** @var mixed[][] */ private $typesConfig = []; /** @var bool */ private $initialized = false; /** @param mixed[][] $typesConfig */ public function __construct(array $typesConfig) { $this->typesConfig = $typesConfig; } /** * Create a connection by name. * * @param mixed[] $params * @param array<string, string> $mappingTypes * @psalm-param Params $params * * @return Connection */ public function createConnection(array $params, ?Configuration $config = null, ?EventManager $eventManager = null, array $mappingTypes = []) { if (! $this->initialized) { $this->initializeTypes(); } $overriddenOptions = []; if (isset($params['connection_override_options'])) { trigger_deprecation('doctrine/doctrine-bundle', '2.4', 'The "connection_override_options" connection parameter is deprecated'); $overriddenOptions = $params['connection_override_options']; unset($params['connection_override_options']); } if (! isset($params['pdo']) && (! isset($params['charset']) || $overriddenOptions || isset($params['dbname_suffix']))) { $wrapperClass = null; if (isset($params['wrapperClass'])) { if (! is_subclass_of($params['wrapperClass'], Connection::class)) { throw DBALException::invalidWrapperClass($params['wrapperClass']); } $wrapperClass = $params['wrapperClass']; $params['wrapperClass'] = null; } $connection = DriverManager::getConnection($params, $config, $eventManager); $params = $this->addDatabaseSuffix(array_merge($connection->getParams(), $overriddenOptions)); $driver = $connection->getDriver(); $platform = $driver->getDatabasePlatform(); if (! isset($params['charset'])) { /** @psalm-suppress UndefinedClass AbstractMySQLPlatform exists since DBAL 3.x only */ if ($platform instanceof AbstractMySQLPlatform || $platform instanceof MySqlPlatform) { $params['charset'] = 'utf8mb4'; /* PARAM_ASCII_STR_ARRAY is defined since doctrine/dbal 3.3 doctrine/dbal 3.3.2 adds support for the option "collation" Checking for that constant will no longer be necessary after dropping support for doctrine/dbal 2, since this package requires doctrine/dbal 3.3.2 or higher. */ if (isset($params['defaultTableOptions']['collate']) && defined('Doctrine\DBAL\Connection::PARAM_ASCII_STR_ARRAY')) { Deprecation::trigger( 'doctrine/doctrine-bundle', 'https://github.com/doctrine/dbal/issues/5214', 'The "collate" default table option is deprecated in favor of "collation" and will be removed in doctrine/doctrine-bundle 3.0. ' ); $params['defaultTableOptions']['collation'] = $params['defaultTableOptions']['collate']; unset($params['defaultTableOptions']['collate']); } $collationOption = defined('Doctrine\DBAL\Connection::PARAM_ASCII_STR_ARRAY') ? 'collation' : 'collate'; if (! isset($params['defaultTableOptions'][$collationOption])) { $params['defaultTableOptions'][$collationOption] = 'utf8mb4_unicode_ci'; } } else { $params['charset'] = 'utf8'; } } if ($wrapperClass !== null) { $params['wrapperClass'] = $wrapperClass; } else { $wrapperClass = Connection::class; } $connection = new $wrapperClass($params, $driver, $config, $eventManager); } else { $connection = DriverManager::getConnection($params, $config, $eventManager); } if (! empty($mappingTypes)) { $platform = $this->getDatabasePlatform($connection); foreach ($mappingTypes as $dbType => $doctrineType) { $platform->registerDoctrineTypeMapping($dbType, $doctrineType); } } return $connection; } /** * Try to get the database platform. * * This could fail if types should be registered to an predefined/unused connection * and the platform version is unknown. * For details have a look at DoctrineBundle issue #673. * * @throws DBALException */ private function getDatabasePlatform(Connection $connection): AbstractPlatform { try { return $connection->getDatabasePlatform(); } catch (DriverException $driverException) { throw new DBALException( 'An exception occurred while establishing a connection to figure out your platform version.' . PHP_EOL . "You can circumvent this by setting a 'server_version' configuration value" . PHP_EOL . PHP_EOL . 'For further information have a look at:' . PHP_EOL . 'https://github.com/doctrine/DoctrineBundle/issues/673', 0, $driverException ); } } /** * initialize the types */ private function initializeTypes(): void { foreach ($this->typesConfig as $typeName => $typeConfig) { if (Type::hasType($typeName)) { Type::overrideType($typeName, $typeConfig['class']); } else { Type::addType($typeName, $typeConfig['class']); } } $this->initialized = true; } /** * @param array<string, mixed> $params * * @return array<string, mixed> */ private function addDatabaseSuffix(array $params): array { if (isset($params['dbname']) && isset($params['dbname_suffix'])) { $params['dbname'] .= $params['dbname_suffix']; } foreach ($params['replica'] ?? [] as $key => $replicaParams) { if (! isset($replicaParams['dbname'], $replicaParams['dbname_suffix'])) { continue; } $params['replica'][$key]['dbname'] .= $replicaParams['dbname_suffix']; } if (isset($params['primary']['dbname'], $params['primary']['dbname_suffix'])) { $params['primary']['dbname'] .= $params['primary']['dbname_suffix']; } return $params; } }