public function getCalendarStopSchedulesByRoute($externalCoverageId, $externalRouteId, $externalStopPointId, $externalCalendarId)
    {
        // TODO: Retrieve fromdatetime from FUSIO
        // cf http://jira.canaltp.fr/browse/METH-196
        $fromdatetime = new \DateTime('now');
        $fromdatetime->setTime(4, 0);

        $parameters = [
            'calendar' => $externalCalendarId,
            'show_codes' => true,
            'from_datetime' => $fromdatetime->format('Ymd\THis'),
            'data_freshness' => 'base_schedule'
        ];

        $query = array(
            'api' => 'coverage',
            'parameters' => array(
                'region' => $externalCoverageId,
                'action' => 'stop_schedules',
                'path_filter' => 'routes/'.$externalRouteId.'/stop_points/'.$externalStopPointId,
                'parameters' => '?'.http_build_query($parameters),
            ),
        );

        $stop_schedulesResponse = $this->navitia_component->call($query);
        // Since we give route id to navitia, only one route schedule is returned
        $response = new \stdClass();
        $response->stop_schedules = $stop_schedulesResponse->stop_schedules[0];
        $response->notes = isset($stop_schedulesResponse->notes) ? $stop_schedulesResponse->notes : array();
        $response->exceptions = isset($stop_schedulesResponse->exceptions) ? $stop_schedulesResponse->exceptions : array();

        return $response;
    }
public function getCalendarStopSchedulesByRoute($externalCoverageId, $externalRouteId, $externalStopPointId, $externalCalendarId)
    {
        // TODO: Retrieve fromdatetime from FUSIO
        // cf http://jira.canaltp.fr/browse/METH-196
        $fromdatetime = new \DateTime('now');
        $fromdatetime->setTime(4, 0);

        $parameters = [
            'calendar' => $externalCalendarId,
            'show_codes' => true,
            'from_datetime' => $fromdatetime->format('Ymd\THis'),
            'data_freshness' => 'base_schedule'
        ];

        $query = array(
            'api' => 'coverage',
            'parameters' => array(
                'region' => $externalCoverageId,
                'action' => 'stop_schedules',
                'path_filter' => 'routes/'.$externalRouteId.'/stop_points/'.$externalStopPointId,
                'parameters' => '?'.http_build_query($parameters),
            ),
        );

        $stop_schedulesResponse = $this->navitia_component->call($query);
        // Since we give route id to navitia, only one route schedule is returned
        $response = new \stdClass();
        $response->stop_schedules = $stop_schedulesResponse->stop_schedules[0];
        $response->notes = isset($stop_schedulesResponse->notes) ? $stop_schedulesResponse->notes : array();
        $response->exceptions = isset($stop_schedulesResponse->exceptions) ? $stop_schedulesResponse->exceptions : array();

        return $response;
    }
public function getCalendarStopSchedulesByRoute ( $ externalCoverageId , $ externalRouteId , $ externalStopPointId , $ externalCalendarId ) { // TODO: Retrieve fromdatetime from FUSIO // cf http://jira.canaltp.fr/browse/METH-196 $ fromdatetime = new \ DateTime ( 'now' ) ; $ fromdatetime -> setTime ( 4 , 0 ) ; $ parameters = [ 'calendar' => $ externalCalendarId , 'show_codes' => true , 'from_datetime' => $ fromdatetime -> format ( 'Ymd\THis' ) , 'data_freshness' => 'base_schedule' ] ; $ query = array ( 'api' => 'coverage' , 'parameters' => array ( 'region' => $ externalCoverageId , 'action' => 'stop_schedules' , 'path_filter' => 'routes/' . $ externalRouteId . '/stop_points/' . $ externalStopPointId , 'parameters' => '?' . http_build_query ( $ parameters ) , ) , ) ; $ stop_schedulesResponse = $ this -> navitia_component -> call ( $ query ) ; // Since we give route id to navitia, only one route schedule is returned $ response = new \ stdClass ( ) ; $ response -> stop_schedules = $ stop_schedulesResponse -> stop_schedules [ 0 ] ; $ response -> notes = isset ( $ stop_schedulesResponse -> notes ) ? $ stop_schedulesResponse -> notes : array ( ) ; $ response -> exceptions = isset ( $ stop_schedulesResponse -> exceptions ) ? $ stop_schedulesResponse -> exceptions : array ( ) ; return $ response ; }
Returns Schedules for a calendar, a stop point and a route.

@param string $externalCoverageId
@param string $externalRouteId
@param string $externalStopPointId
@param string $externalCalendarId

@return object
Returns Schedules for a calendar a stop point and a route .