diff -r bd595ad770fc -r 1c2f13fd785c web/enmi/Zend/Service/Yahoo/WebResult.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/web/enmi/Zend/Service/Yahoo/WebResult.php Thu Jan 20 19:30:54 2011 +0100 @@ -0,0 +1,109 @@ +_fields = array('Summary', 'MimeType', 'ModificationDate'); + parent::__construct($result); + + $this->_xpath = new DOMXPath($result->ownerDocument); + $this->_xpath->registerNamespace('yh', $this->_namespace); + + // check if the cache section exists + $cacheUrl = $this->_xpath->query('./yh:Cache/yh:Url/text()', $result)->item(0); + if ($cacheUrl instanceof DOMNode) + { + $this->CacheUrl = $cacheUrl->data; + } + $cacheSize = $this->_xpath->query('./yh:Cache/yh:Size/text()', $result)->item(0); + if ($cacheSize instanceof DOMNode) + { + $this->CacheSize = (int) $cacheSize->data; + } + } +}