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 333)

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 (mixed $format)
Variables
Methods
createFeed (line 408)

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", "ATOM0.3", "HTML", "JS"

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

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", "ATOM", "ATOM0.3", "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 443)

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", "ATOM0.3".
  • 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 336)
void _setFormat (mixed $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 Fri, 4 Mar 2005 13:56:14 +1000 by phpDocumentor 1.3.0RC3