API Joomla 1.5.26
Documentation des API du CMS Joomla en version 1.5

Référence de la classe FeedCreator

Graphe d'héritage de FeedCreator:
Graphe de collaboration de FeedCreator:

Liste de tous les membres

Fonctions membres publiques

Fonctions membres publiques statiques

Attributs publics


Description détaillée

FeedCreator is the abstract base implementation for concrete implementations that implement a specific format of syndication.

Auteur:
Kai Blankenhorn <kaib@bitfolge.de>
Depuis:
1.4

Documentation des fonctions membres

FeedCreator::_createAdditionalElements ( elements,
indentString = "" 
)

Creates a string containing all additional elements specified in $additionalElements.

Paramètres:
elementsarray an associative array containing key => value pairs
indentStringstring a string that will be inserted before every generated line
Renvoie:
string the XML tags corresponding to $additionalElements

Référencé par AtomCreator03::createFeed(), AtomCreator10::createFeed(), RSSCreator091::createFeed(), et RSSCreator10::createFeed().

Voici le graphe d'appel pour cette fonction :

FeedCreator::_createGeneratorComment ( )

Creates a comment indicating the generator of this feed. The format of this comment seems to be recognized by Syndic8.com.

Référencé par OPMLCreator::createFeed(), AtomCreator03::createFeed(), AtomCreator10::createFeed(), RSSCreator091::createFeed(), et RSSCreator10::createFeed().

Voici le graphe d'appel pour cette fonction :

FeedCreator::_createStylesheetReferences ( )
FeedCreator::_generateFilename ( )

Generate a filename for the feed cache file. The result will be $_SERVER["PHP_SELF"] with the extension changed to .xml. For example:

echo $_SERVER["PHP_SELF"]."\n"; echo FeedCreator::_generateFilename();

would produce:

/rss/latestnews.php latestnews.xml

Renvoie:
string the feed cache filename
Depuis:
1.4 private

Réimplémentée dans MBOXCreator, HTMLCreator, et JSCreator.

Référencé par saveFeed(), et useCached().

Voici le graphe d'appel pour cette fonction :

FeedCreator::_redirect ( filename)
Depuis:
1.4 private

Références $filename.

Référencé par saveFeed(), et useCached().

Voici le graphe d'appel pour cette fonction :

FeedCreator::addItem ( item)

Adds an FeedItem to the feed.

Paramètres:
objectFeedItem $item The FeedItem to add to the feed. public

Références $item, et items.

FeedCreator::createFeed ( )

Builds the feed's text.

Renvoie:
string the feed's complete text

Réimplémentée dans RSSCreator10, RSSCreator091, PIECreator01, AtomCreator10, AtomCreator03, MBOXCreator, OPMLCreator, HTMLCreator, JSCreator, et GoogleSiteMapIndex.

Référencé par outputFeed(), et saveFeed().

Voici le graphe d'appel pour cette fonction :

FeedCreator::iTrunc ( string,
length 
) [static]

Truncates a string to a certain length at the most sensible point. First, if there's a '.' character near the end of the string, the string is truncated after this character. If there is no '.', the string is truncated after the last ' ' character. If the string is truncated, " ..." is appended. If the string is already shorter than $length, it is returned unchanged.

Paramètres:
stringstring A string to be truncated.
intlength the maximum length the string should be truncated to
Renvoie:
string the truncated string

Référencé par HTMLCreator::createFeed(), MBOXCreator::createFeed(), et FeedHtmlField::output().

Voici le graphe d'appel pour cette fonction :

FeedCreator::outputFeed ( )

Outputs this feed directly to the browser - for on-the-fly feed generation

Depuis:
1.7.2-mod

still missing: proper header output - currently you have to add it manually

Références createFeed().

Voici le graphe d'appel pour cette fonction :

FeedCreator::saveFeed ( filename = "",
displayContents = true 
)

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.

Depuis:
1.4
Paramètres:
filenamestring 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()).
redirectboolean optional send an HTTP redirect header or not. If true, the user will be automatically redirected to the created file.

Références $filename, _generateFilename(), _redirect(), et createFeed().

Voici le graphe d'appel pour cette fonction :

FeedCreator::useCached ( filename = "",
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).

Depuis:
1.4
Paramètres:
filenamestring 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()).
timeoutint optional the timeout in seconds before a cached version is refreshed (defaults to 3600 = 1 hour)

Références $filename, _generateFilename(), et _redirect().

Voici le graphe d'appel pour cette fonction :


Documentation des données membres

FeedCreator::$additionalElements = Array()

Any additional elements to include as an assiciated array. All $key => $value pairs will be included unencoded in the feed in the form < $key>="">$value</> Again: No encoding will be used! This means you can invalidate or enhance the feed if $value contains markup. This may be abused to embed tags not implemented by the FeedCreator class used.

FeedCreator::$additionalMarkup = ""

Any additional markup to include as a string. This can be used in places where $additionalElements isn't sufficient (for example, if you need to add elements with attributes, eg: <element attribute="value">).

Depuis:
1.7.3
FeedCreator::$category
FeedCreator::$contentType = "application/xml"

This feed's MIME content type.

Depuis:
1.4 private

Réimplémentée dans HTMLCreator, et JSCreator.

FeedCreator::$copyright
FeedCreator::$description
FeedCreator::$docs
FeedCreator::$editor
FeedCreator::$editorEmail
FeedCreator::$encoding = "UTF-8"

This feed's character encoding.

Depuis:
1.6.1
FeedCreator::$generator = FEEDCREATOR_VERSION

Specifies the generator of the feed.

Depuis:
1.7.3
FeedCreator::$image
FeedCreator::$items = Array()

private

FeedCreator::$language
FeedCreator::$lastBuildDate
FeedCreator::$link
FeedCreator::$podcast
FeedCreator::$pubDate

Référencé par RSSCreator091::createFeed().

FeedCreator::$rating
FeedCreator::$skipDays
FeedCreator::$skipHours
FeedCreator::$syndicationURL

Optional attributes of a feed.

FeedCreator::$title

Mandatory attributes of a feed.

Référencé par OPMLCreator::createFeed().

FeedCreator::$ttl
FeedCreator::$verbose = true

Determines whether or not error messages are displayed by this class.

Depuis:
1.7.3
FeedCreator::$webmaster
FeedCreator::$xslStyleSheet = ""

The url of the external xsl stylesheet used to format the naked rss feed. Ignored in the output when empty.


La documentation de cette classe a été générée à partir du fichier suivant :