| 1 | <?php  | 
            ||
| 5 | class PhotoCollection implements \IteratorAggregate, \Countable  | 
            ||
| 6 | { | 
            ||
| 7 | /**  | 
            ||
| 8 | * @var Photo[]  | 
            ||
| 9 | */  | 
            ||
| 10 | private $photos;  | 
            ||
| 11 | |||
| 12 | /**  | 
            ||
| 13 | * @param Photo $photo  | 
            ||
| 14 | *  | 
            ||
| 15 | * @return $this  | 
            ||
| 16 | */  | 
            ||
| 17 | public function addPhoto(Photo $photo)  | 
            ||
| 23 | |||
| 24 | /**  | 
            ||
| 25 |      * {@inheritdoc} | 
            ||
| 26 | */  | 
            ||
| 27 | public function getIterator()  | 
            ||
| 31 | |||
| 32 | /**  | 
            ||
| 33 |      * {@inheritdoc} | 
            ||
| 34 | */  | 
            ||
| 35 | public function count()  | 
            ||
| 39 | }  | 
            ||
| 40 |