ConfigurationUrlParser
class ConfigurationUrlParser extends ConfigurationUrlParser
Constants
| protected DEFAULT_DRIVER_ALIASES |
The default driver aliases map. |
Properties
| static protected array | $driverAliases | The drivers aliases map. |
from ConfigurationUrlParser |
Methods
Parse the database configuration, hydrating options using a database configuration URL if possible.
Get the primary database connection options.
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.
Details
in
ConfigurationUrlParser at line 32
array
parseConfiguration(array|string $config)
Parse the database configuration, hydrating options using a database configuration URL if possible.
in
ConfigurationUrlParser at line 60
protected array
getPrimaryOptions(array $url)
Get the primary database connection options.
in
ConfigurationUrlParser at line 75
protected string|null
getDriver(array $url)
Get the database driver from the URL.
in
ConfigurationUrlParser at line 89
protected string|null
getDatabase(array $url)
Get the database name from the URL.
in
ConfigurationUrlParser at line 99
protected array
getQueryOptions(array $url)
Get all of the additional database options from the query string.
in
ConfigurationUrlParser at line 119
protected array
parseUrl(string $url)
Parse the string URL to an array of components.
in
ConfigurationUrlParser at line 135
protected mixed
parseStringsToNativeTypes(mixed $value)
Convert string casted values to their native types.
in
ConfigurationUrlParser at line 157
static array
getDriverAliases()
Get all of the current drivers' aliases.
in
ConfigurationUrlParser at line 168
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.
in
ConfigurationUrlParser at line 176
static void
flushState()
Flush all static state.