< Rejseplan - PHP Api - Departure Board
To get a departure board for a stop or station, where stop could be a bus stop or a train station.
use Lsv\Rejseplan\DepartureBoard;
$response = (new DepartureBoard($location))
->setDontUseTrain() // Optional
->setDontUseBus() // Optional
->setDontUseMetro() // Optional
->setDate(new DateTime()) // Optional
->request();
$location
can be
- a
\Lsv\Rejseplan\Response\Location\Stop
- a numeric stop ID
Method | Description |
---|---|
setDontUseTrain() |
If you dont want to see trains on the departure board |
setDontUseBus() |
If you dont want to see busses on the departure board |
setDontUseMetro() |
If you dont want to see metro on the departure board |
setDate(DateTime) |
The date and time of when you want to see the departure board |
The output will be a DepartureBoardResponse object