Issues

ZF-10696: TeraWurfl webservice adapter

Issue Type: Sub-task Created: 2010-11-17T04:33:49.000+0000 Last Updated: 2012-11-20T21:37:53.000+0000 Status: Open Fix version(s): Reporter: Andrew Stephanoff (stephanoff) Assignee: None Tags: - Zend_Http_UserAgent

Related issues: Attachments:

Description

$userAgent, 'format' => 'json', )); $url .= '?' . $args; // read data from webservice $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true, )); $response = curl_exec($ch); // validate for errors if (0 == ($errno = curl_errno($ch))) { curl_close($ch); return $response; } else { $message = sprintf(self::EXC_CURL_ERROR, $errno, curl_error($ch)); curl_close($ch); throw new Zend_Http_UserAgent_Features_Exception($message); } } /** * Return response object * * @param string $json * @return stdClass Tera-WURFL capabilities object * @throws Zend_Http_UserAgent_Features_Exception * @todo validate for errors */ protected static function _processResponse($json) { if (null === ($data = json_decode($json, true))) { $message = sprintf(self::EXC_JSON_DECODE_ERROR, $json); throw new Zend_Http_UserAgent_Features_Exception($message); } return $data; } } ### Comments No comments to display

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts