final class CallbackModel
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

Models nested predicates and source-declared local scopes through shared callback execution.

Methods§

public function __construct(
    private ProgramIndex $index,
    private CallbackEffects $effects,
    private Dialects $dialects = new \SqlCatalog\Core\Sql\Dialects(),
)

Uses source metadata and the current derivation's callback runner.

Parameters

Calls 1
public function apply(
    CallLike $call,
    ObjectTerm $object,
    string $method,
    list<Domain> $arguments,
    Environment $environment,
    FunctionScope $scope,
    ExpressionEvaluator $expressions,
): ?Domain

A nested where callback or local scope, otherwise null.

Parameters

$callCallLike
$objectObjectTerm
$methodstring
$argumentslist<Domain>
$environmentEnvironment
$scopeFunctionScope
$expressionsExpressionEvaluator

Returns

Test cases 2
Calls 16
public function conditional(
    CallLike $call,
    ObjectTerm $object,
    list<Domain> $arguments,
    Environment $environment,
    FunctionScope $scope,
    ExpressionEvaluator $expressions,
): Domain

Both outcomes of a conditional callback, since the condition is not evaluated.

Parameters

$callCallLike
$objectObjectTerm
$argumentslist<Domain>
$environmentEnvironment
$scopeFunctionScope
$expressionsExpressionEvaluator

Returns

Called from 1
Calls 8
public function closed(Domain $result, ObjectTerm $original, string $reason): Domain

The callback's states of the same builder, or a visible gap when its effects escaped or widened.

Parameters

$resultDomain
$originalObjectTerm
$reasonstring

Returns

Test cases 1
Called from 1
Calls 2
public function nested(
    Closure|ArrowFunction $callback,
    ObjectTerm $object,
    string $method,
    Environment $environment,
    FunctionScope $scope,
    ExpressionEvaluator $expressions,
): Domain

Parenthesizes only the callback's predicates, then restores the outer query's fields.

Parameters

$callbackClosure|ArrowFunction
$objectObjectTerm
$methodstring
$environmentEnvironment
$scopeFunctionScope
$expressionsExpressionEvaluator

Returns

Test cases 1
Called from 1
Calls 18
public function checked(Domain $result, ObjectTerm $original): Domain

Leaves a visible gap when a callback loses its receiver or exceeds the budget.

Parameters

$resultDomain
$originalObjectTerm

Returns

Test cases 1
Called from 1
Calls 5

Private surface 3§

Implementation details, listed for orientation only.

private ProgramIndex $index
private CallbackEffects $effects
private Dialects $dialects = new \SqlCatalog\Core\Sql\Dialects()

Test cases 10§

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

Dedicated tests 5
Other tests reaching this symbol 5

Relations§

Instantiated in 1
Type declarations 1