equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Service_Amazon |
16 * @package Zend_Service_Amazon |
17 * @subpackage Ec2 |
17 * @subpackage Ec2 |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: Abstract.php 20096 2010-01-06 02:05:09Z bkarwin $ |
20 * @version $Id: Abstract.php 24593 2012-01-05 20:35:02Z matthew $ |
21 */ |
21 */ |
22 |
22 |
23 /** |
23 /** |
24 * @see Zend_Service_Amazon_Abstract |
24 * @see Zend_Service_Amazon_Abstract |
25 */ |
25 */ |
39 * Provides the basic functionality to send a request to the Amazon Ec2 Query API |
39 * Provides the basic functionality to send a request to the Amazon Ec2 Query API |
40 * |
40 * |
41 * @category Zend |
41 * @category Zend |
42 * @package Zend_Service_Amazon |
42 * @package Zend_Service_Amazon |
43 * @subpackage Ec2 |
43 * @subpackage Ec2 |
44 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
44 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
45 * @license http://framework.zend.com/license/new-bsd New BSD License |
45 * @license http://framework.zend.com/license/new-bsd New BSD License |
46 */ |
46 */ |
47 abstract class Zend_Service_Amazon_Ec2_Abstract extends Zend_Service_Amazon_Abstract |
47 abstract class Zend_Service_Amazon_Ec2_Abstract extends Zend_Service_Amazon_Abstract |
48 { |
48 { |
49 /** |
49 /** |
140 } |
140 } |
141 |
141 |
142 /** |
142 /** |
143 * Sends a HTTP request to the queue service using Zend_Http_Client |
143 * Sends a HTTP request to the queue service using Zend_Http_Client |
144 * |
144 * |
145 * @param array $params List of parameters to send with the request |
145 * @param array $params List of parameters to send with the request |
146 * @return Zend_Service_Amazon_Ec2_Response |
146 * @return Zend_Service_Amazon_Ec2_Response |
147 * @throws Zend_Service_Amazon_Ec2_Exception |
147 * @throws Zend_Service_Amazon_Ec2_Exception |
148 */ |
148 */ |
149 protected function sendRequest(array $params = array()) |
149 protected function sendRequest(array $params = array()) |
150 { |
150 { |
164 $request->setUri($url); |
164 $request->setUri($url); |
165 $request->setMethod(Zend_Http_Client::POST); |
165 $request->setMethod(Zend_Http_Client::POST); |
166 $request->setParameterPost($params); |
166 $request->setParameterPost($params); |
167 |
167 |
168 $httpResponse = $request->request(); |
168 $httpResponse = $request->request(); |
169 |
169 |
170 |
170 |
171 } catch (Zend_Http_Client_Exception $zhce) { |
171 } catch (Zend_Http_Client_Exception $zhce) { |
172 $message = 'Error in request to AWS service: ' . $zhce->getMessage(); |
172 $message = 'Error in request to AWS service: ' . $zhce->getMessage(); |
173 throw new Zend_Service_Amazon_Ec2_Exception($message, $zhce->getCode(), $zhce); |
173 throw new Zend_Service_Amazon_Ec2_Exception($message, $zhce->getCode(), $zhce); |
174 } |
174 } |