final class ZtdConfig

Configuration for ZTD behavior.

Methods§

public function __construct(
    UnsupportedSqlBehavior $unsupportedBehavior = UnsupportedSqlBehavior::Exception,
    UnknownSchemaBehavior $unknownSchemaBehavior = UnknownSchemaBehavior::Passthrough,
    array<string, UnsupportedSqlBehavior> $behaviorRules = [],
)

Parameters

$unsupportedBehaviorUnsupportedSqlBehaviorHow to handle unsupported SQL.
$unknownSchemaBehaviorUnknownSchemaBehaviorHow to handle unknown schema references.
$behaviorRulesarray<string, UnsupportedSqlBehavior>Pattern-to-behavior mapping (first match wins).
Calls 3
public static function default(): self

Create a default configuration with Exception behavior.

Returns

self
Test cases 112
Called from 2
Calls 1
public function unsupportedBehavior(): UnsupportedSqlBehavior

Get the default unsupported SQL behavior mode.

Test cases 1
public function behaviorRules(): list<SqlBehaviorRule>

Get the behavior rules.

Returns

Test cases 1
public function getBehaviorFor(string $sql): ?UnsupportedSqlBehavior

Get the behavior for a specific SQL statement.

Checks behavior rules in order; first matching rule determines behavior. Returns null if no rule matches (use default unsupportedBehavior).

Parameters

$sqlstring
Test cases 7
Called from 1
public function resolveUnsupportedBehavior(string $sql): UnsupportedSqlBehavior

Resolve the effective behavior for a SQL statement.

Uses rule-specific behavior if a rule matches, otherwise default behavior.

Parameters

$sqlstring
Test cases 3
Called from 1
Calls 1

Private surface 3§

Implementation details, listed for orientation only.

private UnsupportedSqlBehavior $unsupportedBehavior
private UnknownSchemaBehavior $unknownSchemaBehavior
private list<SqlBehaviorRule> $behaviorRules

Test cases 160§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 13
Other tests reaching this symbol 147

Relations§

Static calls 2
Method calls 2
Type declarations 12