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_Rest |
16 * @package Zend_Rest |
17 * @subpackage Client |
17 * @subpackage Client |
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: Result.php 20096 2010-01-06 02:05:09Z bkarwin $ |
20 * @version $Id: Result.php 24593 2012-01-05 20:35:02Z matthew $ |
21 */ |
21 */ |
22 |
22 |
23 /** |
23 /** |
24 * @category Zend |
24 * @category Zend |
25 * @package Zend_Rest |
25 * @package Zend_Rest |
26 * @subpackage Client |
26 * @subpackage Client |
27 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
27 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
28 * @license http://framework.zend.com/license/new-bsd New BSD License |
28 * @license http://framework.zend.com/license/new-bsd New BSD License |
29 */ |
29 */ |
30 class Zend_Rest_Client_Result implements IteratorAggregate { |
30 class Zend_Rest_Client_Result implements IteratorAggregate { |
31 /** |
31 /** |
32 * @var SimpleXMLElement |
32 * @var SimpleXMLElement |
178 * @return boolean |
178 * @return boolean |
179 */ |
179 */ |
180 public function getStatus() |
180 public function getStatus() |
181 { |
181 { |
182 $status = $this->_sxml->xpath('//status/text()'); |
182 $status = $this->_sxml->xpath('//status/text()'); |
183 |
183 if ( !isset($status[0]) ) return false; |
|
184 |
184 $status = strtolower($status[0]); |
185 $status = strtolower($status[0]); |
185 |
186 |
186 if (ctype_alpha($status) && $status == 'success') { |
187 if (ctype_alpha($status) && $status == 'success') { |
187 return true; |
188 return true; |
188 } elseif (ctype_alpha($status) && $status != 'success') { |
189 } elseif (ctype_alpha($status) && $status != 'success') { |