File Manager Lite
Dir:
/home/u540325668/domains/mccsociety.org/Composer.error.public_html/vendor/illuminate/support
Upload
[..]
AggregateServiceProvider.php (995 B)
Edit
Rename
Del
Arr.php (15.62 KB)
Edit
Rename
Del
Carbon.php (115 B)
Edit
Rename
Del
Collection.php (30.12 KB)
Edit
Rename
Del
Composer.php (2.33 KB)
Edit
Rename
Del
ConfigurationUrlParser.php (4.33 KB)
Edit
Rename
Del
DateFactory.php (7.83 KB)
Edit
Rename
Del
Enumerable.php (21.35 KB)
Edit
Rename
Del
Env.php (3.02 KB)
Edit
Rename
Del
Facades/
Rename
Del
Fluent.php (3.79 KB)
Edit
Rename
Del
HigherOrderCollectionProxy.php (1.38 KB)
Edit
Rename
Del
HigherOrderTapProxy.php (665 B)
Edit
Rename
Del
HtmlString.php (699 B)
Edit
Rename
Del
InteractsWithTime.php (1.55 KB)
Edit
Rename
Del
LICENSE.md (1.05 KB)
Edit
Rename
Del
LazyCollection.php (29.71 KB)
Edit
Rename
Del
Manager.php (3.98 KB)
Edit
Rename
Del
MessageBag.php (9.17 KB)
Edit
Rename
Del
NamespacedItemResolver.php (3.19 KB)
Edit
Rename
Del
Optional.php (2.58 KB)
Edit
Rename
Del
Pluralizer.php (3.13 KB)
Edit
Rename
Del
ProcessUtils.php (2 KB)
Edit
Rename
Del
Reflector.php (2.61 KB)
Edit
Rename
Del
ServiceProvider.php (8.51 KB)
Edit
Rename
Del
Str.php (27.01 KB)
Edit
Rename
Del
Testing/
Rename
Del
Traits/
Rename
Del
ViewErrorBag.php (2.56 KB)
Edit
Rename
Del
composer.json (1.47 KB)
Edit
Rename
Del
helpers.php (12.87 KB)
Edit
Rename
Del
Edit: ConfigurationUrlParser.php
<?php namespace Illuminate\Support; use InvalidArgumentException; class ConfigurationUrlParser { /** * The drivers aliases map. * * @var array */ protected static $driverAliases = [ 'mssql' => 'sqlsrv', 'mysql2' => 'mysql', // RDS 'postgres' => 'pgsql', 'postgresql' => 'pgsql', 'sqlite3' => 'sqlite', 'redis' => 'tcp', 'rediss' => 'tls', ]; /** * Parse the database configuration, hydrating options using a database configuration URL if possible. * * @param array|string $config * @return array */ public function parseConfiguration($config) { if (is_string($config)) { $config = ['url' => $config]; } $url = $config['url'] ?? null; $config = Arr::except($config, 'url'); if (! $url) { return $config; } $rawComponents = $this->parseUrl($url); $decodedComponents = $this->parseStringsToNativeTypes( array_map('rawurldecode', $rawComponents) ); return array_merge( $config, $this->getPrimaryOptions($decodedComponents), $this->getQueryOptions($rawComponents) ); } /** * Get the primary database connection options. * * @param array $url * @return array */ protected function getPrimaryOptions($url) { return array_filter([ 'driver' => $this->getDriver($url), 'database' => $this->getDatabase($url), 'host' => $url['host'] ?? null, 'port' => $url['port'] ?? null, 'username' => $url['user'] ?? null, 'password' => $url['pass'] ?? null, ], function ($value) { return ! is_null($value); }); } /** * Get the database driver from the URL. * * @param array $url * @return string|null */ protected function getDriver($url) { $alias = $url['scheme'] ?? null; if (! $alias) { return; } return static::$driverAliases[$alias] ?? $alias; } /** * Get the database name from the URL. * * @param array $url * @return string|null */ protected function getDatabase($url) { $path = $url['path'] ?? null; return $path && $path !== '/' ? substr($path, 1) : null; } /** * Get all of the additional database options from the query string. * * @param array $url * @return array */ protected function getQueryOptions($url) { $queryString = $url['query'] ?? null; if (! $queryString) { return []; } $query = []; parse_str($queryString, $query); return $this->parseStringsToNativeTypes($query); } /** * Parse the string URL to an array of components. * * @param string $url * @return array * * @throws \InvalidArgumentException */ protected function parseUrl($url) { $url = preg_replace('#^(sqlite3?):///#', '$1://null/', $url); $parsedUrl = parse_url($url); if ($parsedUrl === false) { throw new InvalidArgumentException('The database configuration URL is malformed.'); } return $parsedUrl; } /** * Convert string casted values to their native types. * * @param mixed $value * @return mixed */ protected function parseStringsToNativeTypes($value) { if (is_array($value)) { return array_map([$this, 'parseStringsToNativeTypes'], $value); } if (! is_string($value)) { return $value; } $parsedValue = json_decode($value, true); if (json_last_error() === JSON_ERROR_NONE) { return $parsedValue; } return $value; } /** * Get all of the current drivers aliases. * * @return array */ public static function getDriverAliases() { return static::$driverAliases; } /** * Add the given driver alias to the driver aliases array. * * @param string $alias * @param string $driver * @return void */ public static function addDriverAlias($alias, $driver) { static::$driverAliases[$alias] = $driver; } }
Simpan