1: <?php
2:
3: declare(strict_types=1);
4:
5: namespace LaravelUi5\OData\Service\Contracts;
6:
7: /**
8: * Resolves a function-invocation query plan into a return value.
9: *
10: * Implementations live in Driver\ and execute the function call, returning
11: * whatever the function declares as its return type. The plan parameter is
12: * typed as QueryPlanInterface to keep Service\ free of Protocol\ imports;
13: * at runtime the value is always a FunctionInvocationPlan.
14: *
15: * @see QueryPlanInterface
16: */
17: interface FunctionResolverInterface
18: {
19: /**
20: * Execute the function and return its result.
21: *
22: * @param QueryPlanInterface $plan At runtime always Protocol\Planning\FunctionInvocationPlan
23: */
24: public function resolve(QueryPlanInterface $plan): mixed;
25: }
26: