Doctrine\DBAL\DriverManager::parseDatabaseUrlPath PHP Method

parseDatabaseUrlPath() private static method

Assumes that the connection URL scheme is already parsed and resolved into the given connection parameters via {@link parseDatabaseUrlScheme}.
See also: parseDatabaseUrlScheme
private static parseDatabaseUrlPath ( array $url, array $params ) : array
$url array The URL parts to evaluate.
$params array The connection parameters to resolve.
return array The resolved connection parameters.
    private static function parseDatabaseUrlPath(array $url, array $params)
    {
        if (!isset($url['path'])) {
            return $params;
        }
        $url['path'] = self::normalizeDatabaseUrlPath($url['path']);
        // If we do not have a known DBAL driver, we do not know any connection URL path semantics to evaluate
        // and therefore treat the path as regular DBAL connection URL path.
        if (!isset($params['driver'])) {
            return self::parseRegularDatabaseUrlPath($url, $params);
        }
        if (strpos($params['driver'], 'sqlite') !== false) {
            return self::parseSqliteDatabaseUrlPath($url, $params);
        }
        return self::parseRegularDatabaseUrlPath($url, $params);
    }