ConfigurationUrlParser
class ConfigurationUrlParser (View source)
Traits
Properties
| static protected array<string, string> | $sqlServerDsnOptionAliases | The SQL Server DSN option aliases. |
from ParsesSqlServerConfigurationUrls |
| static protected array<string, string> | $driverAliases | The drivers aliases map. |
Methods
Determine if the given value is a SQL Server DSN.
Parse a SQL Server DSN into a database configuration.
Get the database configuration options from a SQL Server DSN.
Parse the options from a SQL Server DSN.
Parse the host and port from a SQL Server DSN Server option.
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.
Details
protected bool
isSqlServerDsn(string $url)
Determine if the given value is a SQL Server DSN.
protected array<string, mixed>
parseSqlServerDsnConfiguration(array<string, mixed> $config, string $dsn)
Parse a SQL Server DSN into a database configuration.
protected array<string, mixed>
getSqlServerDsnConfigurationOptions(array<string, string> $options)
Get the database configuration options from a SQL Server DSN.
protected array<string, string>
parseSqlServerDsnOptions(string $dsn)
Parse the options from a SQL Server DSN.
protected array{0: string|null, 1: int|null}
parseSqlServerDsnServer(string|null $server)
Parse the host and port from a SQL Server DSN Server option.
array<string, mixed>
parseConfiguration(array<string, mixed>|string $config)
Parse the database configuration, hydrating options using a database configuration URL if possible.
protected array<string, mixed>
getPrimaryOptions(array<string, mixed> $url)
Get the primary database connection options.
protected string|null
getDriver(array<string, mixed> $url)
Get the database driver from the URL.
protected string|null
getDatabase(array<string, mixed> $url)
Get the database name from the URL.
protected array<string, mixed>
getQueryOptions(array<string, mixed> $url)
Get all of the additional database options from the query string.
protected array<string, mixed>
parseUrl(string $url)
Parse the string URL to an array of components.
protected mixed
parseStringsToNativeTypes(mixed $value)
Convert string casted values to their native types.
static array<string, string>
getDriverAliases()
Get all of the current drivers' aliases.
static void
addDriverAlias(string $alias, string $driver)
Add the given driver alias to the driver aliases array.