equal
deleted
inserted
replaced
14 * to license@zend.com so we can send you a copy immediately. |
14 * to license@zend.com so we can send you a copy immediately. |
15 * |
15 * |
16 * @category Zend |
16 * @category Zend |
17 * @package Zend_Service |
17 * @package Zend_Service |
18 * @subpackage Amazon |
18 * @subpackage Amazon |
19 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
20 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @license http://framework.zend.com/license/new-bsd New BSD License |
21 * @version $Id: CustomerReview.php 20096 2010-01-06 02:05:09Z bkarwin $ |
21 * @version $Id: CustomerReview.php 24780 2012-05-08 19:34:59Z adamlundrigan $ |
22 */ |
22 */ |
23 |
23 |
24 |
24 |
25 /** |
25 /** |
26 * @category Zend |
26 * @category Zend |
27 * @package Zend_Service |
27 * @package Zend_Service |
28 * @subpackage Amazon |
28 * @subpackage Amazon |
29 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
29 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
30 * @license http://framework.zend.com/license/new-bsd New BSD License |
30 * @license http://framework.zend.com/license/new-bsd New BSD License |
31 */ |
31 */ |
32 class Zend_Service_Amazon_CustomerReview |
32 class Zend_Service_Amazon_CustomerReview |
33 { |
33 { |
34 /** |
34 /** |
73 * @return void |
73 * @return void |
74 */ |
74 */ |
75 public function __construct(DOMElement $dom) |
75 public function __construct(DOMElement $dom) |
76 { |
76 { |
77 $xpath = new DOMXPath($dom->ownerDocument); |
77 $xpath = new DOMXPath($dom->ownerDocument); |
78 $xpath->registerNamespace('az', 'http://webservices.amazon.com/AWSECommerceService/2005-10-05'); |
78 $xpath->registerNamespace('az', 'http://webservices.amazon.com/AWSECommerceService/2011-08-01'); |
79 foreach (array('Rating', 'HelpfulVotes', 'CustomerId', 'TotalVotes', 'Date', 'Summary', 'Content') as $el) { |
79 foreach (array('Rating', 'HelpfulVotes', 'CustomerId', 'TotalVotes', 'Date', 'Summary', 'Content') as $el) { |
80 $result = $xpath->query("./az:$el/text()", $dom); |
80 $result = $xpath->query("./az:$el/text()", $dom); |
81 if ($result->length == 1) { |
81 if ($result->length == 1) { |
82 $this->$el = (string) $result->item(0)->data; |
82 $this->$el = (string) $result->item(0)->data; |
83 } |
83 } |