ConfigurationUrlParser
class ConfigurationUrlParser
Constants
| protected DEFAULT_DRIVER_ALIASES |
The default driver aliases map. |
Properties
| static protected array<string, string> | $driverAliases | The drivers aliases map. |
Methods
Parse the database configuration, hydrating options using a database configuration URL if possible.
Get the primary database connection options.
Get the database driver from the URL.
Get the database name from the URL.
Get all of the additional database options from the query string.
Parse the string URL to an array of components.
Convert string casted values to their native types.
Get all of the current drivers' aliases.
Add the given driver alias to the driver aliases array.
Flush all static state.
Details
at line 37
array
parseConfiguration(array|string $config)
Parse the database configuration, hydrating options using a database configuration URL if possible.
at line 74
protected array
getPrimaryOptions(array $url)
Get the primary database connection options.
at line 91
protected string|null
getDriver(array $url)
Get the database driver from the URL.
at line 107
protected string|null
getDatabase(array $url)
Get the database name from the URL.
at line 120
protected array
getQueryOptions(array $url)
Get all of the additional database options from the query string.
at line 142
protected array
parseUrl(string $url)
Parse the string URL to an array of components.
at line 158
protected mixed
parseStringsToNativeTypes(mixed $value)
Convert string casted values to their native types.
at line 182
static array
getDriverAliases()
Get all of the current drivers' aliases.
at line 193
static void
addDriverAlias(string $alias, string $driver)
Add the given driver alias to the driver aliases array.
Boot-only. Driver aliases persist in a static property for the worker lifetime and apply to every subsequent configuration URL parse.
at line 201
static void
flushState()
Flush all static state.