Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libs/Zend/Feed/Reader/Extension/EntryAbstract.php')
-rw-r--r--libs/Zend/Feed/Reader/Extension/EntryAbstract.php23
1 files changed, 13 insertions, 10 deletions
diff --git a/libs/Zend/Feed/Reader/Extension/EntryAbstract.php b/libs/Zend/Feed/Reader/Extension/EntryAbstract.php
index 68ae193cf7..299c1bfbaf 100644
--- a/libs/Zend/Feed/Reader/Extension/EntryAbstract.php
+++ b/libs/Zend/Feed/Reader/Extension/EntryAbstract.php
@@ -14,15 +14,15 @@
*
* @category Zend
* @package Zend_Feed_Reader
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
- * @version $Id: EntryAbstract.php 16711 2009-07-14 16:10:54Z matthew $
+ * @version $Id: EntryAbstract.php 20096 2010-01-06 02:05:09Z bkarwin $
*/
/**
* @category Zend
* @package Zend_Feed_Reader
- * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Zend_Feed_Reader_Extension_EntryAbstract
@@ -86,14 +86,14 @@ abstract class Zend_Feed_Reader_Extension_EntryAbstract
if (!is_null($type)) {
$this->_data['type'] = $type;
} else {
- $this->_data['type'] = Zend_Feed_Reader::detectType($feed);
+ $this->_data['type'] = Zend_Feed_Reader::detectType($entry->ownerDocument, true);
}
// set the XPath query prefix for the entry being queried
- if ($this->getType() == Zend_Feed_Reader::TYPE_RSS_10
+ if ($this->getType() == Zend_Feed_Reader::TYPE_RSS_10
|| $this->getType() == Zend_Feed_Reader::TYPE_RSS_090
) {
$this->setXpathPrefix('//rss:item[' . ($this->_entryKey+1) . ']');
- } elseif ($this->getType() == Zend_Feed_Reader::TYPE_ATOM_10
+ } elseif ($this->getType() == Zend_Feed_Reader::TYPE_ATOM_10
|| $this->getType() == Zend_Feed_Reader::TYPE_ATOM_03
) {
$this->setXpathPrefix('//atom:entry[' . ($this->_entryKey+1) . ']');
@@ -123,7 +123,7 @@ abstract class Zend_Feed_Reader_Extension_EntryAbstract
return $assumed;
}
- /**
+ /**
* Get the entry type
*
* @return string
@@ -153,6 +153,9 @@ abstract class Zend_Feed_Reader_Extension_EntryAbstract
*/
public function getXpath()
{
+ if (!$this->_xpath) {
+ $this->setXpath(new DOMXPath($this->getDomDocument()));
+ }
return $this->_xpath;
}
@@ -178,8 +181,8 @@ abstract class Zend_Feed_Reader_Extension_EntryAbstract
/**
* Set the XPath prefix
- *
- * @param string $prefix
+ *
+ * @param string $prefix
* @return Zend_Feed_Reader_Extension_EntryAbstract
*/
public function setXpathPrefix($prefix)
@@ -190,7 +193,7 @@ abstract class Zend_Feed_Reader_Extension_EntryAbstract
/**
* Register XML namespaces
- *
+ *
* @return void
*/
protected abstract function _registerNamespaces();