Version: current

# Class RSSFeed

RSSFeed class

This class is used to create an RSS feed.

  Object
  ViewableData implements IteratorAggregate
  RSSFeed

Package: sapphire\integration
Located at sapphire/api/RSSFeed.php

## Methods summary

`public` | # `__construct( `DataObjectSet` $entries, string $link, string $title, string $description = null, string $titleField = "Title", string $descriptionField = "Content", string $authorField = null, integer $lastModified = null, string $etag = null )` Constructor Constructor #### Parameters $entries DataObjectSet $entries RSS feed entries $link string $link Link to the feed $title string $title Title of the feed $description string $description Description of the field $titleField string $titleField Name of the field that should be used for the titles for the feed entries $descriptionField string $descriptionField Name of the field that should be used for the description for the feed entries $authorField string $authorField Name of the field that should be used for the author for the feed entries $lastModified int $lastModified Unix timestamp of the latest modification (latest posting) $etag string $etag The ETag is an unique identifier that is changed every time the representation does #### Overrides `Object::__construct`
`public static` | # `linkToFeed( string $url, string $title = null )` Include an link to the feed Include an link to the feed #### Parameters $url string $url URL of the feed $title string $title Title to show
`public `DataObjectSet`` | # `Entries( )` Get the RSS feed entries Get the RSS feed entries #### Returns ``DataObjectSet`` Returns the `RSSFeed_Entry` objects.
`public string` | # `Title( )` Get the title of thisfeed Get the title of thisfeed #### Returns `string` Returns the title of the feed.
`public string` | # `Link( string $action = null )` Get the URL of this feed Get the URL of this feed #### Parameters $action string $action #### Returns `string` Returns the URL of the feed.
`public string` | # `Description( )` Get the description of this feed Get the description of this feed #### Returns `string` Returns the description of the feed.
`public` | # `outputToBrowser( )` Output the feed to the browser Output the feed to the browser
`public` | # `feedContent( )` Return the content of the RSS feed Return the content of the RSS feed

### Methods inherited from ViewableData

`ATT_val()`, `BaseHref()`, `CSSClasses()`, `ColumnBreak()`, `ColumnCalc()`, `ColumnNumber()`, `ColumnPad()`, `ColumnPos()`, `CurrentMember()`, `CurrentPage()`, `Debug()`, `Even()`, `EvenOdd()`, `First()`, `FirstLast()`, `HasPerm()`, `IsAjax()`, `JS_val()`, `Last()`, `Me()`, `Middle()`, `MiddleString()`, `Modulus()`, `MultipleOf()`, `Odd()`, `Pos()`, `RAW_val()`, `SQL_val()`, `ThemeDir()`, `ThemeName()`, `Top()`, `TotalItems()`, `XML_val()`, `__get()`, `__isset()`, `__set()`, `buildCastingCache()`, `cachedCall()`, `castingClass()`, `castingHelper()`, `castingHelperPair()`, `castingObjectCreator()`, `castingObjectCreatorPair()`, `customise()`, `defineMethods()`, `escapeTypeForField()`, `getField()`, `getIterator()`, `getSecurityID()`, `getXMLValues()`, `hasField()`, `hasValue()`, `i18nLocale()`, `iteratorProperties()`, `obj()`, `renderWith()`, `setCustomisedObj()`, `setField()`

### Methods inherited from Object

`__call()`, `__toString()`, `__wakeup()`, `addMethodsFrom()`, `addStaticVars()`, `addWrapperMethod()`, `add_extension()`, `add_static_var()`, `allMethodNames()`, `cacheToFile()`, `cacheToFileWithArgs()`, `clearCache()`, `combined_static()`, `create()`, `createMethod()`, `create_from_string()`, `exists()`, `extInstance()`, `extend()`, `getCustomClass()`, `getExtensionInstance()`, `getExtensionInstances()`, `get_extensions()`, `get_static()`, `hasExtension()`, `hasMethod()`, `has_extension()`, `invokeWithExtensions()`, `is_a()`, `loadCache()`, `parentClass()`, `parse_class_spec()`, `remove_extension()`, `sanitiseCachename()`, `saveCache()`, `set_stat()`, `set_static()`, `set_uninherited()`, `stat()`, `strong_create()`, `uninherited()`, `uninherited_static()`, `useCustomClass()`

### Magic methods summary

## Properties summary

`public static array` | $casting | # Casting information for this object's methods. Let's us use $Title.XML in templates Casting information for this object's methods. Let's us use $Title.XML in templates
`protected `DataObjectSet`` | $entries | # Holds the feed entries Holds the feed entries
`protected string` | $title | # Title of the feed Title of the feed
`protected string` | $description | # Description of the feed Description of the feed
`protected string` | $link | # Link to the feed Link to the feed
`protected string` | $titleField | # Name of the title field of feed entries Name of the title field of feed entries
`protected string` | $descriptionField | # Name of the description field of feed entries Name of the description field of feed entries
`protected string` | $authorField | # Name of the author field of feed entries Name of the author field of feed entries
`protected integer` | $lastModified | # Last modification of the RSS feed Last modification of the RSS feed
`protected string` | $etag | # ETag for the RSS feed (used for client-site caching) ETag for the RSS feed (used for client-site caching)

### Properties inherited from ViewableData

`$customisedObject`, `$default_cast`, `$failover`, `$iteratorPos`, `$iteratorTotalItems`

### Properties inherited from Object

`$class`, `$extension_instances`, `$extensions`

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -