File Manager Lite
Dir:
/home/codewavebd/public_html/vendor/laravel/framework/src/Illuminate/Support
Upload
[..]
Benchmark.php (2.05 KB)
Edit
Rename
Del
BinaryCodec.php (2.9 KB)
Edit
Rename
Del
Carbon.php (2.11 KB)
Edit
Rename
Del
Composer.php (6.84 KB)
Edit
Rename
Del
ConfigurationUrlParser.php (4.42 KB)
Edit
Rename
Del
DateFactory.php (10.47 KB)
Edit
Rename
Del
DefaultProviders.php (3.26 KB)
Edit
Rename
Del
Defer/
Rename
Del
Env.php (8.34 KB)
Edit
Rename
Del
Exceptions/
Rename
Del
Facades/
Rename
Del
Fluent.php (7.47 KB)
Edit
Rename
Del
HigherOrderTapProxy.php (645 B)
Edit
Rename
Del
HtmlString.php (1.05 KB)
Edit
Rename
Del
InteractsWithTime.php (2.03 KB)
Edit
Rename
Del
Js.php (3.86 KB)
Edit
Rename
Del
LICENSE.md (1.05 KB)
Edit
Rename
Del
Lottery.php (6.05 KB)
Edit
Rename
Del
Manager.php (4.79 KB)
Edit
Rename
Del
MessageBag.php (10.55 KB)
Edit
Rename
Del
MultipleInstanceManager.php (5.52 KB)
Edit
Rename
Del
NamespacedItemResolver.php (3.33 KB)
Edit
Rename
Del
Number.php (12.93 KB)
Edit
Rename
Del
Once.php (1.86 KB)
Edit
Rename
Del
Onceable.php (2.49 KB)
Edit
Rename
Del
Optional.php (2.65 KB)
Edit
Rename
Del
Pluralizer.php (2.84 KB)
Edit
Rename
Del
Queue/
Rename
Del
RebindsCallbacksToSelf.php (860 B)
Edit
Rename
Del
ServiceProvider.php (16.76 KB)
Edit
Rename
Del
Sleep.php (12.14 KB)
Edit
Rename
Del
Str.php (64.62 KB)
Edit
Rename
Del
Stringable.php (38.62 KB)
Edit
Rename
Del
Testing/
Rename
Del
Timebox.php (1.66 KB)
Edit
Rename
Del
Traits/
Rename
Del
Uri.php (11.56 KB)
Edit
Rename
Del
ValidatedInput.php (4.62 KB)
Edit
Rename
Del
ViewErrorBag.php (2.69 KB)
Edit
Rename
Del
composer.json (2.08 KB)
Edit
Rename
Del
functions.php (4.14 KB)
Edit
Rename
Del
helpers.php (13.35 KB)
Edit
Rename
Del
Edit: ConfigurationUrlParser.php
<?php namespace Illuminate\Support; use InvalidArgumentException; class ConfigurationUrlParser { /** * The drivers aliases map. * * @var array<string, string> */ 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, mixed>|string $config * @return array<string, mixed> */ public function parseConfiguration($config) { if (is_string($config)) { $config = ['url' => $config]; } $url = Arr::pull($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<string, mixed> $url * @return array<string, mixed> */ 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, ], fn ($value) => ! is_null($value)); } /** * Get the database driver from the URL. * * @param array<string, mixed> $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<string, mixed> $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<string, mixed> $url * @return array<string, mixed> */ 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<string, mixed> * * @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<string, string> */ 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