| 1 | <?php |
||
| 12 | class Stations { |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var \ Mvg\Parser\Html\Stations |
||
| 16 | */ |
||
| 17 | protected $stationsParser = null; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param \ Mvg\Parser\Html\Stations $stationsParser |
||
| 21 | */ |
||
| 22 | public function __construct(StationsParser $stationsParser) { |
||
| 25 | |||
| 26 | public function getOutput() { |
||
| 27 | $str = ''; |
||
| 28 | foreach ($this->getStationsParser()->getStationsForTerm() as $station) { |
||
| 29 | $str .= $station->name . "\n"; |
||
| 30 | } |
||
| 31 | return $str; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @return \ Mvg\Parser\Html\Stations |
||
| 36 | */ |
||
| 37 | protected function getStationsParser() { |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param \ Mvg\Parser\Html\Stations $stationsParser |
||
| 43 | */ |
||
| 44 | protected function setStationsParser(StationsParser $stationsParser) { |
||
| 47 | |||
| 48 | |||
| 49 | } |