API: ConnectionConfig#
Class: Infocyph\DBLayer\Connection\ConnectionConfig
ConnectionConfig is immutable and normalized. It merges defaults, resolves
driver aliases, and exposes structured accessors for replica and security
settings used by Connection and pool modules.
Factory and Access#
__construct(array $config)fromArray(array $config): selftoArray(): arraytoSafeArray(): array(recursively redacts sensitive keys)get(string $key, mixed $default = null): mixedwith(string $key, mixed $value): self
Read/Write Split#
hasReadConfig(),getReadConfig(),getReadConfigs()getReadStrategy()->random,round_robin,least_latency,weightedgetReadHealthCooldown()getLeastLatencyCacheTtl()getReadProbeSampleSize()shouldEnforceReadSessionReadOnly()hasWriteConfig(),getWriteConfig(),getWriteConfigs()isSticky()
Statement Cache + Query Comment#
shouldUseStatementCache()statementCacheSize()shouldUseQueryComments()getQueryCommentMaxLength()getQueryCommentContext()
Security#
isSecurityEnabled()securityConfig()
Security config keys currently supported:
enabledmax_sql_lengthmax_paramsmax_param_bytesqueries_per_second,queries_per_minuterate_limit_key,rate_limit_callbackstrict_identifiersrequire_tlsallow_insecureraw_sql_policy,raw_sql_allowlist
Core#
getDriver()getDatabase()