rss
[ class tree: rss ] [ index: rss ] [ all elements ]

Class: UniversalFeedCreator

Source Location: d:\website\PhpDocumentor\/rss/feedcreator.class.php

Class Overview

HtmlDescribable
   |
   --FeedCreator
      |
      --UniversalFeedCreator



Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: FeedCreator

FeedCreator::addItem()
Adds an FeedItem to the feed.
FeedCreator::createFeed()
Builds the feed's text.
FeedCreator::iTrunc()
Truncates a string to a certain length at the most sensible point.
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.
FeedCreator::useCached()
Turns on caching and checks if there is a recent version of this feed in the cache.
FeedCreator::_createAdditionalElements()
Creates a string containing all additional elements specified in $additionalElements.
FeedCreator::_createGeneratorComment()
Creates a comment indicating the generator of this feed.
FeedCreator::_createStylesheetReferences()

Class: HtmlDescribable

HtmlDescribable::getDescription()
Returns a formatted description field, depending on descriptionHtmlSyndicated and

Class Details

[line 288]


Tags:

author:  Kai Blankenhorn <kaib@bitfolge.de>
since:  1.3


[ Top ]


Class Variables

$_feed =

[line 289]


Type:   mixed


[ Top ]



Class Methods


method createFeed [line 363]

string createFeed( [string $format = "RSS0.91"])

Creates a syndication feed based on the items previously added.



Tags:

return:  the contents of the feed.
see:  FeedCreator::addItem()


Overrides FeedCreator::createFeed() (Builds the feed's text.)

Parameters:

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"

[ Top ]

method saveFeed [line 380]

void saveFeed( [string $format = "RSS0.91"], [string $filename = ""], [boolean $displayContents = true])

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.



Tags:

since:  1.4


Overrides 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.)

Parameters:

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.

[ Top ]

method useCached [line 398]

void useCached( [string $format = "RSS0.91"], [filename $filename = ""], [timeout $timeout = 3600])

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




Overrides FeedCreator::useCached() (Turns on caching and checks if there is a recent version of this feed in the cache.)

Parameters:

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)

[ Top ]

method _setFormat [line 291]

void _setFormat( $format)



Parameters:

   $format  

[ Top ]


Documentation generated on Thu, 15 Feb 2007 20:39:12 +0000 by phpDocumentor 1.3.0