Przeglądaj źródła

Merge r25274 to 1.12 release branch

git-svn-id: http://framework.zend.com/svn/framework/standard/branches/release-1.12@25275 44c647ce-9c0f-0410-b52a-842ac1e357ba
frosch 13 lat temu
rodzic
commit
06c8c4c8c7

+ 2 - 0
library/Zend/Feed/Reader.php

@@ -443,7 +443,9 @@ class Zend_Feed_Reader
      * Detect the feed type of the provided feed
      *
      * @param  Zend_Feed_Abstract|DOMDocument|string $feed
+     * @param  bool                                  $specOnly
      * @return string
+     * @throws Zend_Feed_Exception
      */
     public static function detectType($feed, $specOnly = false)
     {

+ 10 - 6
library/Zend/Feed/Reader/EntryAbstract.php

@@ -72,9 +72,9 @@ abstract class Zend_Feed_Reader_EntryAbstract
     /**
      * Constructor
      *
-     * @param  DOMElement $entry
-     * @param  int $entryKey
-     * @param  string $type
+     * @param  DOMElement  $entry
+     * @param  int         $entryKey
+     * @param  string|null $type
      * @return void
      */
     public function __construct(DOMElement $entry, $entryKey, $type = null)
@@ -85,7 +85,9 @@ abstract class Zend_Feed_Reader_EntryAbstract
         if ($type !== null) {
             $this->_data['type'] = $type;
         } else {
-            $this->_data['type'] = Zend_Feed_Reader::detectType($feed);
+            $this->_data['type'] = Zend_Feed_Reader::detectType(
+                $this->_domDocument
+            );
         }
         $this->_loadExtensions();
     }
@@ -212,8 +214,10 @@ abstract class Zend_Feed_Reader_EntryAbstract
             }
         }
         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');
+        throw new Zend_Feed_Exception(
+            'Method: ' . $method
+            . 'does not exist and could not be located on a registered Extension'
+        );
     }
 
     /**