src/includes/classes/Core/Utils/Pdo.php
protected function dbConfig($shard_id_or_host = null, $uuid_or_host_db_name = null): array
    {
        $cache_keys = [$shard_id_or_host, $uuid_or_host_db_name];

        if (($properties = &$this->cacheKey(__FUNCTION__, $cache_keys)) !== null) {
            return $properties; // Cached this already.
        }
        if (!isset($shard_id_or_host)) {
            $shard_id_or_host = is_int($uuid_or_host_db_name)
                ? $this->c::uuid64ShardIdIn($uuid_or_host_db_name)
                : $this->App->Config->©mysql_db['©default']['©host'];
        }
        if (!isset($uuid_or_host_db_name) && is_string($shard_id_or_host)) {
            $uuid_or_host_db_name = $this->App->Config->©mysql_db['©default']['©name'];
        }
        if (is_int($shard_id = $shard_id_or_host) && $shard_id >= 0) {
            foreach ($this->App->Config->©mysql_db['©shards'] as $_key => $_shard_db) {
                if ($shard_id >= $_shard_db['©range']['©from'] && $shard_id <= $_shard_db['©range']['©to']) {
                    return $properties = $_shard_db['©properties'];
                }
            } // unset($_key, $_shard_db);
        } elseif (is_string($host = $shard_id_or_host) && is_string($host_db_name) && $host && $host_db_name) {
            return $properties = ['©host' => $host, '©name' => $host_db_name];
        }
        throw $this->c::issue(sprintf('Missing DB config for: `%1$s`, `%2$s`.', $shard_id_or_host, $uuid_or_host_db_name));
    }
protected function dbConfig($shard_id_or_host = null, $uuid_or_host_db_name = null): array
    {
        $cache_keys = [$shard_id_or_host, $uuid_or_host_db_name];

        if (($properties = &$this->cacheKey(__FUNCTION__, $cache_keys)) !== null) {
            return $properties; // Cached this already.
        }
        if (!isset($shard_id_or_host)) {
            $shard_id_or_host = is_int($uuid_or_host_db_name)
                ? $this->c::uuid64ShardIdIn($uuid_or_host_db_name)
                : $this->App->Config->©mysql_db['©default']['©host'];
        }
        if (!isset($uuid_or_host_db_name) && is_string($shard_id_or_host)) {
            $uuid_or_host_db_name = $this->App->Config->©mysql_db['©default']['©name'];
        }
        if (is_int($shard_id = $shard_id_or_host) && $shard_id >= 0) {
            foreach ($this->App->Config->©mysql_db['©shards'] as $_key => $_shard_db) {
                if ($shard_id >= $_shard_db['©range']['©from'] && $shard_id <= $_shard_db['©range']['©to']) {
                    return $properties = $_shard_db['©properties'];
                }
            } // unset($_key, $_shard_db);
        } elseif (is_string($host = $shard_id_or_host) && is_string($host_db_name) && $host && $host_db_name) {
            return $properties = ['©host' => $host, '©name' => $host_db_name];
        }
        throw $this->c::issue(sprintf('Missing DB config for: `%1$s`, `%2$s`.', $shard_id_or_host, $uuid_or_host_db_name));
    }
DB config properties.

@since 150424 Initial release.
@since 17xxxx Additional arg/types.

@param int|string|null $shard_id_or_host     Shard ID or DB host.
@param int|string|null $uuid_or_host_db_name UUID64 or host DB name.

@return array DB config properties.