You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SchedulesDataAccess.php 669B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: robin
  5. * Date: 10/1/16
  6. * Time: 5:32 PM
  7. */
  8. namespace App\DataAccess;
  9. use GuzzleHttp\Client;
  10. use Luticate\Utils\Controller\LuticateApplication;
  11. class SchedulesDataAccess
  12. {
  13. public static function get(string $resourceId, string $type, string $stopId, string $routeId)
  14. {
  15. $client = new Client();
  16. $entrypoint = LuticateApplication::getInstance()->getSetting("API_ENTRYPOINT");
  17. $response = $client->request("GET", $entrypoint . "transit/${resourceId}/${type}/stops/${stopId}/routes/${routeId}/schedule.json");
  18. $data = json_decode($response->getBody(), true);
  19. return $data;
  20. }
  21. }