| 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: | use LaravelUi5\OData\Protocol\Planning\Expression\FilterExpression; |
| 10: | |
| 11: | final readonly class EntitySetQueryPlan extends QueryPlan |
| 12: | { |
| 13: | |
| 14: | |
| 15: | |
| 16: | public function __construct( |
| 17: | public EntitySetInterface $target, |
| 18: | public ?FilterExpression $filter, |
| 19: | public SelectList $select, |
| 20: | public ExpandList $expand, |
| 21: | public OrderByList $orderBy, |
| 22: | public ?int $top, |
| 23: | public ?int $skip, |
| 24: | public ?string $skipToken, |
| 25: | public bool $count, |
| 26: | public ?string $search = null, |
| 27: | public array $compute = [], |
| 28: | public ?int $maxPageSize = null, |
| 29: | public ?NavigationAnchor $anchor = null, |
| 30: | public CustomQueryOptions $customQueryOptions = new CustomQueryOptions(), |
| 31: | ) {} |
| 32: | |
| 33: | |
| 34: | public function withExpand(ExpandList $expand): self |
| 35: | { |
| 36: | return new self( |
| 37: | $this->target, |
| 38: | $this->filter, |
| 39: | $this->select, |
| 40: | $expand, |
| 41: | $this->orderBy, |
| 42: | $this->top, |
| 43: | $this->skip, |
| 44: | $this->skipToken, |
| 45: | $this->count, |
| 46: | $this->search, |
| 47: | $this->compute, |
| 48: | $this->maxPageSize, |
| 49: | $this->anchor, |
| 50: | $this->customQueryOptions, |
| 51: | ); |
| 52: | } |
| 53: | } |
| 54: | |