| 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\Edm\Contracts\Property\NavigationPropertyInterface; |
| 9: | use LaravelUi5\OData\Protocol\Planning\Expression\FilterExpression; |
| 10: | |
| 11: | final readonly class ExpandItem |
| 12: | { |
| 13: | public function __construct( |
| 14: | public NavigationPropertyInterface $property, |
| 15: | public EntitySetInterface $targetSet, |
| 16: | public ?FilterExpression $filter = null, |
| 17: | public SelectList $select = new SelectList(), |
| 18: | public ExpandList $expand = new ExpandList(), |
| 19: | public ?OrderByList $orderBy = null, |
| 20: | public ?int $top = null, |
| 21: | public ?int $skip = null, |
| 22: | public bool $count = false, |
| 23: | ) {} |
| 24: | |
| 25: | |
| 26: | public function withExpand(ExpandList $expand): self |
| 27: | { |
| 28: | return new self( |
| 29: | $this->property, |
| 30: | $this->targetSet, |
| 31: | $this->filter, |
| 32: | $this->select, |
| 33: | $expand, |
| 34: | $this->orderBy, |
| 35: | $this->top, |
| 36: | $this->skip, |
| 37: | $this->count, |
| 38: | ); |
| 39: | } |
| 40: | } |
| 41: | |