src/ClientAdapters/GuzzleClientAdapter.php
public function getForecast($latitude, $longitude, \DateTime $time = null, array $parameters = null)
    {
        $this->requestedUrl = $this->buildRequestURL($latitude, $longitude, $time, $parameters);

        $response = $this->guzzleClient->get($this->requestedUrl);

        $cacheDirectives = $this->buildCacheDirectives($response);

        $this->responseHeaders = [
            'cache' => $cacheDirectives,
            'responseTime' => (int)$response->getHeader('x-response-time'),
            'apiCalls' => (int)$response->getHeader('x-forecast-api-calls')
        ];
        return json_decode($response->getBody(), true);
    }
public function getForecast($latitude, $longitude, \DateTime $time = null, array $parameters = null)
    {
        $this->requestedUrl = $this->buildRequestURL($latitude, $longitude, $time, $parameters);

        $response = $this->guzzleClient->get($this->requestedUrl);

        $cacheDirectives = $this->buildCacheDirectives($response);

        $this->responseHeaders = [
            'cache' => $cacheDirectives,
            'responseTime' => (int)$response->getHeader('x-response-time'),
            'apiCalls' => (int)$response->getHeader('x-forecast-api-calls')
        ];
        return json_decode($response->getBody(), true);
    }
public function getForecast ( $ latitude , $ longitude , \ DateTime $ time = null , array $ parameters = null ) { $ this -> requestedUrl = $ this -> buildRequestURL ( $ latitude , $ longitude , $ time , $ parameters ) ; $ response = $ this -> guzzleClient -> get ( $ this -> requestedUrl ) ; $ cacheDirectives = $ this -> buildCacheDirectives ( $ response ) ; $ this -> responseHeaders = [ 'cache' => $ cacheDirectives , 'responseTime' => ( int ) $ response -> getHeader ( 'x-response-time' ) , 'apiCalls' => ( int ) $ response -> getHeader ( 'x-forecast-api-calls' ) ] ; return json_decode ( $ response -> getBody ( ) , true ) ; }
Returns the response data from the Dark Sky API in the
form of an array.

@param float $latitude
@param float $longitude
@param \DateTime $time
@param array $parameters

@return array
Returns the response data from the Dark Sky API in the form of an array .