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/EntryAbstract.php')
-rw-r--r--libs/Zend/Feed/Reader/EntryAbstract.php28
1 files changed, 12 insertions, 16 deletions
diff --git a/libs/Zend/Feed/Reader/EntryAbstract.php b/libs/Zend/Feed/Reader/EntryAbstract.php
index 153149ebcc..f73e1d1e8e 100644
--- a/libs/Zend/Feed/Reader/EntryAbstract.php
+++ b/libs/Zend/Feed/Reader/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 16966 2009-07-22 15:22:18Z padraic $
+ * @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_EntryAbstract
@@ -118,6 +118,9 @@ abstract class Zend_Feed_Reader_EntryAbstract
public function getEncoding()
{
$assumed = $this->getDomDocument()->encoding;
+ if (empty($assumed)) {
+ $assumed = 'UTF-8';
+ }
return $assumed;
}
@@ -134,7 +137,7 @@ abstract class Zend_Feed_Reader_EntryAbstract
return $dom->saveXml();
}
- /**
+ /**
* Get the entry type
*
* @return string
@@ -151,10 +154,13 @@ abstract class Zend_Feed_Reader_EntryAbstract
*/
public function getXpath()
{
+ if (!$this->_xpath) {
+ $this->setXpath(new DOMXPath($this->getDomDocument()));
+ }
return $this->_xpath;
}
- /**
+ /**
* Set the XPath query
*
* @param DOMXPath $xpath
@@ -167,16 +173,6 @@ abstract class Zend_Feed_Reader_EntryAbstract
}
/**
- * Serialize the entry to an array
- *
- * @return array
- */
- public function toArray()
- {
- return $this->_data;
- }
-
- /**
* Get registered extensions
*
* @return array
@@ -215,7 +211,7 @@ abstract class Zend_Feed_Reader_EntryAbstract
return call_user_func_array(array($extension, $method), $args);
}
}
- require_once 'Zend/Feed/Exception.php';
+ // require_once 'Zend/Feed/Exception.php';
throw new Zend_Feed_Exception('Method: ' . $method
. 'does not exist and could not be located on a registered Extension');
}