| 1 | <?php |
||
| 9 | class DragonCollection extends ArrayCollection |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @param Dragon $dragon |
||
| 13 | * @return $this |
||
| 14 | * @throws LogicException |
||
| 15 | */ |
||
| 16 | public function update(Dragon $dragon) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param Dragon $dragon |
||
| 28 | */ |
||
| 29 | public function append(Dragon $dragon) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @return Dragon|null |
||
| 36 | */ |
||
| 37 | public function current() |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param Dragon $dragon |
||
| 44 | * @return bool|int |
||
| 45 | */ |
||
| 46 | public function findKey(Dragon $dragon) |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @param int $id |
||
| 61 | * @return Dragon|bool |
||
| 62 | */ |
||
| 63 | public function findById(int $id) |
||
| 75 | |||
| 76 | /** |
||
| 77 | * @return array |
||
| 78 | */ |
||
| 79 | public function toArray() |
||
| 93 | |||
| 94 | /** |
||
| 95 | * @return string |
||
| 96 | */ |
||
| 97 | public function toJson() |
||
| 101 | |||
| 102 | /** |
||
| 103 | * @return string |
||
| 104 | */ |
||
| 105 | public function __toString() |
||
| 109 | } |
||
| 110 |