diff options
author | xue <> | 2007-07-17 17:27:20 +0000 |
---|---|---|
committer | xue <> | 2007-07-17 17:27:20 +0000 |
commit | 879efac4a5198cb6ab71bb8a3d50771e6d687970 (patch) | |
tree | d07d7bc0612bd78e30453b87f28ee34d914a058e | |
parent | 9a59a5cab1384998872f8ee3b6653b90e03718c3 (diff) |
updated UPGRADE instruction.
-rw-r--r-- | UPGRADE | 7 | ||||
-rw-r--r-- | framework/Web/Services/TFeedService.php | 34 |
2 files changed, 17 insertions, 24 deletions
@@ -1,5 +1,5 @@ - Upgrading Instructions for PRADO Framework v3.1.0
+ Upgrading Instructions for PRADO Framework v3.1.1
=================================================
!!!IMPORTANT!!!
@@ -9,6 +9,11 @@ if you want to upgrade from version A to version C and there is version B between A and C, you need to following the instructions
for both A and B.
+Upgrading from v3.1.0
+---------------------
+- IFeedContentProvider adds a new method getContentType(). This affects any
+ class implementing this interface.
+
Upgrading from v3.1b
--------------------
- Comment tag <!-- ... ---> (introduced in v3.1a) is changed to <!--- ... --->
diff --git a/framework/Web/Services/TFeedService.php b/framework/Web/Services/TFeedService.php index a40bcca9..af3b44bd 100644 --- a/framework/Web/Services/TFeedService.php +++ b/framework/Web/Services/TFeedService.php @@ -44,7 +44,6 @@ class TFeedService extends TService
{
private $_feeds=array();
- private $_contentType='text/xml';
/**
* Initializes this module.
@@ -93,7 +92,7 @@ class TFeedService extends TService $content=$feed->getFeedContent();
//$this->getResponse()->setContentType('application/rss+xml');
- $this->getResponse()->setContentType($this->getContentType());
+ $this->getResponse()->setContentType($feed->getContentType());
$this->getResponse()->write($content);
}
else
@@ -105,27 +104,6 @@ class TFeedService extends TService else
throw new THttpException(404,'feedservice_feed_unknown',$id);
}
-
- /**
- * @return string the content type for the feed content. Defaults to 'text/xml'.
- */
- public function getContentType()
- {
- return $this->_contentType;
- }
-
- /**
- * Sets the content type of the feed content to be sent.
- * Some examples are:
- * RSS 1.0 feed: application/rdf+xml
- * RSS 2.0 feed: application/rss+xml or application/xml or text/xml
- * ATOM feed: application/atom+xml
- * @param string the content type for the feed content.
- */
- public function setContentType($type)
- {
- $this->_contentType=$type;
- }
}
/**
@@ -153,6 +131,16 @@ interface IFeedContentProvider * @return string feed content in proper XML format
*/
public function getFeedContent();
+ /**
+ * Sets the content type of the feed content to be sent.
+ * Some examples are:
+ * RSS 1.0 feed: application/rdf+xml
+ * RSS 2.0 feed: application/rss+xml or application/xml or text/xml
+ * ATOM feed: application/atom+xml
+ * @return string the content type for the feed content.
+ * @since 3.1.1
+ */
+ public function getContentType();
}
?>
\ No newline at end of file |