|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 00032 class Zend_Service_Amazon_SimilarProduct 00033 { 00037 public $ASIN; 00038 00042 public $Title; 00043 00050 public function __construct(DOMElement $dom) 00051 { 00052 $xpath = new DOMXPath($dom->ownerDocument); 00053 $xpath->registerNamespace('az', 'http://webservices.amazon.com/AWSECommerceService/2005-10-05'); 00054 foreach (array('ASIN', 'Title') as $el) { 00055 $text = $xpath->query("./az:$el/text()", $dom)->item(0); 00056 if($text instanceof DOMText) { 00057 $this->$el = (string)$text->data; 00058 } 00059 } 00060 } 00061 }