| 1 | <?php |
||
| 9 | class Notifications implements IteratorAggregate, Countable |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var Notification[] |
||
| 13 | */ |
||
| 14 | private $notifications; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param Notification[] $notifications |
||
| 18 | */ |
||
| 19 | 24 | public function __construct(array $notifications = []) |
|
| 23 | |||
| 24 | /** |
||
| 25 | * @param array $notifications |
||
| 26 | * @return Notifications |
||
| 27 | */ |
||
| 28 | public static function mapFromArray(array $notifications) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @return ArrayIterator |
||
| 39 | */ |
||
| 40 | 12 | public function getIterator() |
|
| 44 | |||
| 45 | /** |
||
| 46 | * @return int |
||
| 47 | */ |
||
| 48 | 6 | public function count() |
|
| 52 | } |
||
| 53 |