| 1 | <?php |
||
| 21 | final class SubresourceMetadata |
||
| 22 | { |
||
| 23 | private $resourceClass; |
||
| 24 | private $collection; |
||
| 25 | private $maxDepth; |
||
| 26 | |||
| 27 | public function __construct(string $resourceClass, bool $collection = false, int $maxDepth = null) |
||
| 28 | { |
||
| 29 | $this->resourceClass = $resourceClass; |
||
| 30 | $this->collection = $collection; |
||
| 31 | $this->maxDepth = $maxDepth; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function getResourceClass(): string |
||
| 38 | |||
| 39 | public function withResourceClass($resourceClass): self |
||
| 46 | |||
| 47 | public function isCollection(): bool |
||
| 51 | |||
| 52 | public function withCollection(bool $collection): self |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @return int |
||
| 62 | */ |
||
| 63 | public function getMaxDepth() |
||
| 67 | } |
||
| 68 |