| 1 | <?php |
||
| 10 | class DragonCollection extends ArrayCollection implements JsonSerializable |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @param Dragon $dragon |
||
| 14 | * @return $this |
||
| 15 | * @throws LogicException |
||
| 16 | */ |
||
| 17 | public function update(Dragon $dragon) |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param Dragon $dragon |
||
| 29 | */ |
||
| 30 | public function append(Dragon $dragon) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return Dragon|null |
||
| 37 | */ |
||
| 38 | public function current() |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param Dragon $dragon |
||
| 45 | * @return bool|int |
||
| 46 | */ |
||
| 47 | public function findKey(Dragon $dragon) |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @param int $id |
||
| 62 | * @return Dragon|bool |
||
| 63 | */ |
||
| 64 | public function findById(int $id) |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @return array |
||
| 79 | */ |
||
| 80 | public function toArray(): array |
||
| 94 | |||
| 95 | /** |
||
| 96 | * @return string |
||
| 97 | */ |
||
| 98 | public function jsonSerialize(): string |
||
| 102 | |||
| 103 | /** |
||
| 104 | * @return string |
||
| 105 | */ |
||
| 106 | public function __toString(): string |
||
| 110 | } |
||
| 111 |