1: <?php
2:
3: declare(strict_types=1);
4:
5: namespace LaravelUi5\OData\Protocol\Planning;
6:
7: use LaravelUi5\OData\Edm\Contracts\Container\EntitySetInterface;
8: use LaravelUi5\OData\Http\CustomQueryOptions;
9:
10: final readonly class EntityQueryPlan extends QueryPlan
11: {
12: public function __construct(
13: public EntitySetInterface $target,
14: public KeyExpression $key,
15: public SelectList $select,
16: public ExpandList $expand,
17: public ?NavigationAnchor $anchor = null,
18: public CustomQueryOptions $customQueryOptions = new CustomQueryOptions(),
19: ) {}
20:
21: /** Readonly clone with a replaced expand list (used by the read-authz honest-partial prune). */
22: public function withExpand(ExpandList $expand): self
23: {
24: return new self(
25: $this->target,
26: $this->key,
27: $this->select,
28: $expand,
29: $this->anchor,
30: $this->customQueryOptions,
31: );
32: }
33: }
34: