protected function executeQuery($endpoint)
    {
        $ch = curl_init($endpoint);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

        $responseContent = curl_exec($ch);
        $httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);

        if ($responseContent === false || $httpStatus != 200) {
            throw new MoneyException('Could not execute YahooFinanceRatioProvider query to endpoint '.$endpoint);
        }

        curl_close($ch);

        return $responseContent;
    }
protected function executeQuery($endpoint)
    {
        $ch = curl_init($endpoint);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

        $responseContent = curl_exec($ch);
        $httpStatus = curl_getinfo($ch, CURLINFO_HTTP_CODE);

        if ($responseContent === false || $httpStatus != 200) {
            throw new MoneyException('Could not execute YahooFinanceRatioProvider query to endpoint '.$endpoint);
        }

        curl_close($ch);

        return $responseContent;
    }
protected function executeQuery ( $ endpoint ) { $ ch = curl_init ( $ endpoint ) ; curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , true ) ; $ responseContent = curl_exec ( $ ch ) ; $ httpStatus = curl_getinfo ( $ ch , CURLINFO_HTTP_CODE ) ; if ( $ responseContent === false || $ httpStatus != 200 ) { throw new MoneyException ( 'Could not execute YahooFinanceRatioProvider query to endpoint ' . $ endpoint ) ; } curl_close ( $ ch ) ; return $ responseContent ; }
Executes the query to the API endpoint.

@param string $endpoint Endpoint's URI

@return string The response content

@throws MoneyException if the query has failed or the response status is not 200
Executes the query to the API endpoint .