Skip to content

Commit

Permalink
Minor fix - Iterator pattern example
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranahmedse authored Feb 27, 2017
1 parent b75365b commit b9a53a8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1414,16 +1414,16 @@ And then it can be used as
```php
$stationList = new StationList();

$stationList->addStation(new Station(89));
$stationList->addStation(new Station(101));
$stationList->addStation(new Station(102));
$stationList->addStation(new Station(103.2));
$stationList->addStation(new RadioStation(89));
$stationList->addStation(new RadioStation(101));
$stationList->addStation(new RadioStation(102));
$stationList->addStation(new RadioStation(103.2));

foreach($stationList as $station) {
echo $station->getFrequency() . PHP_EOL;
}

$stationList->removeStation(new Station(89)); // Will remove station 89
$stationList->removeStation(new RadioStation(89)); // Will remove station 89
```

👽 Mediator
Expand Down

0 comments on commit b9a53a8

Please sign in to comment.