Tuskfish API V1.1.3
  • Package
  • Class

Packages

  • content
  • core
  • database
  • installation
  • security
  • user
  • utilities

Classes

  • TfArticle
  • TfAudio
  • TfBlock
  • TfBlockHandler
  • TfCollection
  • TfCollectionHandler
  • TfContentController
  • TfContentControllerFactory
  • TfContentFactory
  • TfContentHandler
  • TfContentObject
  • TfDownload
  • TfImage
  • TfRss
  • TfSearchContent
  • TfStatic
  • TfTag
  • TfTagHandler
  • TfTaglinkHandler
  • TfVideo

Traits

  • TfContentTypes

Class TfRss

Generates RSS feeds for the whole site, individual collections and tags.

For information about the RSS 2.0 spec see http://cyber.harvard.edu/rss/rss.html

TfRss uses TfMagicMethods
Package: content
Copyright: Simon Wilkinson 2013+ (https://tuskfish.biz)
License: GNU General Public License (GPL) V2
Author: Simon Wilkinson simon@isengard.biz
Version: Release: 1.0
Since: 1.0
Uses: TfMagicMethods Implementation of magic methods to restrict direct property access.
Located at trust_path/modules/content/class/TfRss.php

Methods summary

public
# __construct( TfValidator $validator, TfPreference $preference )

Constructor.

Constructor.

Parameters

$validator
An instance of the Tuskfish data validator class.
$preference
An instance of the Tuskfish site preferences class.
public
# makeFeedForCollection( TfCollection $obj )

Make a RSS feed for a collection object.

Make a RSS feed for a collection object.

Parameters

$obj
A collection object.
public
# setCopyright( string $copyright )

Set the copyright notice for this feed.

Set the copyright notice for this feed.

Parameters

$copyright
Copyright notice.
public string
# getCopyright( )

Returns the feed copyright notice XSS escaped for display.

Returns the feed copyright notice XSS escaped for display.

Returns

string
Copyright notice.
public
# setDescription( string $description )

Set the description of this feed.

Set the description of this feed.

Parameters

$description
Description of feed.
public string
# getDescription( )

Returns the feed description with tags removed and XSS escaped for display.

Returns the feed description with tags removed and XSS escaped for display.

Returns

string
Description of feed.
public
# setGenerator( string $generator )

Set the software generator for this feed.

Set the software generator for this feed.

Parameters

$generator

Name of the software used to generate this feed. For security reasons, the generator tag has been removed from the Tuskfish RSS template, but you can add it in if you don't mind people knowing what software your site is running.

public string
# getGenerator( )

Returns the generator of this feed XSS escaped for display.

Returns the generator of this feed XSS escaped for display.

Not currently in use.

Returns

string
Generator.
public
# setImage( string $image )

Set the image for this feed (not implemented).

Set the image for this feed (not implemented).

Parameters

$image
Image for this feed.
public
# setItems( array $items )

Set the content/posts for this feed.

Set the content/posts for this feed.

Parameters

$items
Items to be included in the feed.
public array
# getItems( )

Returns an array of content items associated with this feed.

Returns an array of content items associated with this feed.

Note that the items are objects and their individual properties need to be XSS escaped separately.

Returns

array
Array of content objects associated with this feed.
public
# setLink( string $url )

Set the base URL for this feed.

Set the base URL for this feed.

Defaults to the value of TFISH_RSS.

Parameters

$url
Base URL for this feed.
public string
# getLink( )

Returns the base URL of the feed XSS escaped for display.

Returns the base URL of the feed XSS escaped for display.

Returns

string
Base URL of feed.
public
# setManagingEditor( string $email )

Set the managing editor of this feed.

Set the managing editor of this feed.

Parameters

$email
Email address of the managing editor.
public string
# getManagingEditor( )

Returns the managing editor of this feed.

Returns the managing editor of this feed.

Returns

string
Managing editor.
public
# setTitle( string $title )

Set the title of this feed.

Set the title of this feed.

Parameters

$title
Title of the feed.
public string
# getTitle( )

Returns the title of the feed XSS escaped for display.

Returns the title of the feed XSS escaped for display.

Returns

string
Title.
public
# setWebMaster( string $email )

Set the webMaster property.

Set the webMaster property.

Parameters

$email
email of the webmaster responsible for the feed.
public string
# getWebMaster( )

Get the wemaster for this feed XSS escaped for display.

Get the wemaster for this feed XSS escaped for display.

Returns

string
Webmaster.

Methods used from TfMagicMethods

__get(), __isset(), __set(), __unset()

Properties summary

protected $validator
#
protected $title
#
protected $link
#
protected $description
#
protected $copyright
#
protected $managingEditor
#
protected $webMaster
#
protected $generator
#
protected $items
#
protected $template
#

Magic properties

public TfValidator $validator

Instance of the Tuskfish data validator class.

public string $title

Name of channel.

public string $link

URL to website associated with this channel.

public string $description

Sentence describing the channel.

public string $copyright

Copyright license of this channel.

public string $managingEditor

Email of the editor.

public string $webMaster

Email of the webmaster.

public string $generator

Name of software system generating this feed.

public string $image

Image representing channel.

public array $items

Array of content objects.

public string $template

Template for presenting feed, default 'rss'.

Tuskfish API V1.1.3 API documentation generated by ApiGen