| 1 | <?php |
||
| 10 | class ParentId extends AbstractQuery |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * ParentId constructor. |
||
| 14 | * |
||
| 15 | * @param string $type Name of the child relationship mapped for the join field |
||
| 16 | * @param string $id ID of the parent document. The query will return child documents of this parent document. |
||
| 17 | * @param bool $ignoreUnmapped Indicates whether to ignore an unmapped type and not return any documents instead of an error. Defaults to false. |
||
| 18 | */ |
||
| 19 | public function __construct(string $type, string $id, bool $ignoreUnmapped = false) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param string $type |
||
| 28 | */ |
||
| 29 | private function setRelationshipType(string $type) |
||
| 30 | { |
||
| 31 | $this->setParam('type', $type); |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @param string $id |
||
| 36 | */ |
||
| 37 | private function setId(string $id) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param bool $ignoreUnmapped |
||
| 44 | */ |
||
| 45 | private function setIgnoreUnmapped(bool $ignoreUnmapped = false) |
||
| 49 | } |
||
| 50 |