classCallContext
final class CallContext
Public API: explicitly declared with
@visibility public.A PHP call AST together with its evaluated inputs and shared object memory.
$node = new \PhpParser\Node\Expr\FuncCall(new \PhpParser\Node\Name('today_sql'));
$expressions = (new \SqlCatalog\Core\Analysis\Interpreter(new \SqlCatalog\Core\Php\ProgramIndex(), []))->evaluatorFor();
$call = new \SqlCatalog\Core\Extension\Model\CallContext($node, [], new \SqlCatalog\Core\Evaluation\Environment(), new \SqlCatalog\Core\Analysis\FunctionScope('query.php'), $expressions, name: 'today_sql');
$call->name // => 'today_sql'Properties§
public CallLike $nodepublic list<Domain> $argumentspublic Environment $environmentpublic FunctionScope $scopepublic ExpressionEvaluator $expressionspublic ?string $name = nullpublic ?Domain $receiver = nullpublic ?string $className = nullpublic ?SinkSpec $sink = nullMethods§
public function __construct(
public CallLike $node,
public list<Domain> $arguments,
public Environment $environment,
public FunctionScope $scope,
public ExpressionEvaluator $expressions,
public ?string $name = null,
public ?Domain $receiver = null,
public ?string $className = null,
public ?SinkSpec $sink = null,
)Parameters
$node | CallLike | |
$arguments | list<Domain> | Values in source argument order, including unresolved values. |
$environment | Environment | |
$scope | FunctionScope | |
$expressions | ExpressionEvaluator | |
$name | ?string | |
$receiver | ?Domain | |
$className | ?string | |
$sink | ?SinkSpec |
Test cases 22§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
Other tests reaching this symbol 21
CatalogCommandTestcallsCallEvaluatorTestcallsCalleeReturnsTestcallsCallersTestcallsDeriverTestcallsEntryBinderTestcallsCallbackEffectsTestcallsSliceExecutorTestcallsExpressionEvaluatorTestcallsRegistryTest::testEvaluateCallUsesTheNewestHandlingFunctionAndPreservesItsDomaincallsRegistryTest::testRegisterCallKeepsNamedFunctionModelsAvailablecallsInterpreterTestcallsReferenceEvaluatorTestcallsModelSetTest::testMergePreservesCallOrderAndReplacesStatementKeyscallsBuilderQueriesTestcallsCallbackModelTestcallsCallModelTestcallsAnalyzerTest::testAnalyzeSourceAllowsExtensionsToModelSqlFragmentsFromAnyCallFormcallsAnalyzerTest::testAnalyzeSourceLetsRegisteredCallModelsOwnTheirArgumentEffectscallsJsonReporterTestcallsTextReporterTestcalls
Relations§
Instantiated in 4
- new SqlCatalog\Core\Analysis\CallEvaluator::evaluate() packages/sql-catalog/src/Core/Analysis/CallEvaluator.php:88
- new SqlCatalog\Core\Analysis\CallEvaluator::evaluateMethod() packages/sql-catalog/src/Core/Analysis/CallEvaluator.php:196
- new SqlCatalog\Core\Analysis\CallEvaluator::evaluateStatic() packages/sql-catalog/src/Core/Analysis/CallEvaluator.php:283
- new SqlCatalog\Core\Analysis\CallEvaluator::evaluateFunction() packages/sql-catalog/src/Core/Analysis/CallEvaluator.php:323