Class UniversalFeedCreator

Description

UniversalFeedCreator lets you choose during runtime which format to build.

For general usage of a feed class, see the FeedCreator class below or the example above.

Located in /includes/feedcreator.class.php (line 338)

HtmlDescribable
   |
   --FeedCreator
      |
      --UniversalFeedCreator
Variable Summary
 mixed $_feed
Method Summary
 string createFeed ([string $format = "RSS0.91"])
 void saveFeed ([string $format = "RSS0.91"], [string $filename = ""], [boolean $displayContents = true])
 void useCached ([string $format = "RSS0.91"], [filename $filename = ""], [timeout $timeout = 3600])
 void _setFormat ( $format)
Variables
Methods
createFeed (line 413)

Creates a syndication feed based on the items previously added.

string createFeed ([string $format = "RSS0.91"])
  • string $format: format format the feed should comply to. Valid values are: "PIE0.1", "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM1.0", "HTML", "JS"

Redefinition of:
FeedCreator::createFeed()
Builds the feed's text.
saveFeed (line 430)

Saves this feed as a file on the local disk. After the file is saved, an HTTP redirect header may be sent to redirect the use to the newly created file.

  • since: 1.4
void saveFeed ([string $format = "RSS0.91"], [string $filename = ""], [boolean $displayContents = true])
  • string $format: format format the feed should comply to. Valid values are: "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM1.0", "HTML", "JS"
  • string $filename: filename optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
  • boolean $displayContents: displayContents optional send the content of the file or not. If true, the file will be sent in the body of the response.

Redefinition of:
FeedCreator::saveFeed()
Saves this feed as a file on the local disk. After the file is saved, a redirect header may be sent to redirect the user to the newly created file.
useCached (line 448)

Turns on caching and checks if there is a recent version of this feed in the cache.

If there is, an HTTP redirect header is sent. To effectively use caching, you should create the FeedCreator object and call this method before anything else, especially before you do the time consuming task to build the feed (web fetching, for example).

void useCached ([string $format = "RSS0.91"], [filename $filename = ""], [timeout $timeout = 3600])
  • string $format: format format the feed should comply to. Valid values are: "PIE0.1" (deprecated), "mbox", "RSS0.91", "RSS1.0", "RSS2.0", "OPML", "ATOM1.0".
  • filename $filename: string optional the filename where a recent version of the feed is saved. If not specified, the filename is $_SERVER["PHP_SELF"] with the extension changed to .xml (see _generateFilename()).
  • timeout $timeout: int optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour)

Redefinition of:
FeedCreator::useCached()
Turns on caching and checks if there is a recent version of this feed in the cache.
_setFormat (line 341)
void _setFormat ( $format)
  • $format

Inherited Methods

Inherited From FeedCreator

 FeedCreator::addItem()
 FeedCreator::createFeed()
 FeedCreator::iTrunc()
 FeedCreator::saveFeed()
 FeedCreator::useCached()
 FeedCreator::_createAdditionalElements()
 FeedCreator::_createGeneratorComment()
 FeedCreator::_createStylesheetReferences()

Inherited From HtmlDescribable

 HtmlDescribable::getDescription()

Documentation generated on Mon, 05 May 2008 16:19:42 +0400 by phpDocumentor 1.4.0