Properties

$title

$title : 

Type

$description

$description : 

Type

$link

$link : 

Type

$logo

$logo : 

Type

$icon

$icon : 

Type

$pubdate

$pubdate : 

Type

$lang

$lang : 

Type

$charset

$charset : 

Type

$ctype

$ctype : 

Type

$caching

$caching : 

Type

$cacheKey

$cacheKey : 

Type

$items

$items : 

Type

$shortening

$shortening : 

Type

$shorteningLimit

$shorteningLimit : 

Type

$dateFormat

$dateFormat : 

Type

$namespaces

$namespaces : 

Type

$customView

$customView : 

Type

Methods

add()

add(string  $title, string  $author, string  $link, string  $pubdate, string  $description, string  $content = '', array  $enclosure = array()) : void

Add new item to $items array

Parameters

string $title
string $author
string $link
string $pubdate
string $description
string $content
array $enclosure

(optional)

addArray()

addArray(array  $a) : void

Add new item to $items array

Parameters

array $a

render()

render(string  $format = null, integer  $cache, string  $key = null) : \view

Returns aggregated feed with all items from $items array

Parameters

string $format

(options: 'atom', 'rss')

integer $cache

(0 - turns off the cache)

string $key

Returns

\view

link()

link(string  $url, string  $format = 'atom') : string

Create link

Parameters

string $url
string $format

Returns

string

setView()

setView(string  $name = null) : void

Set Custom view if you don't like the ones that come built in with the package

Parameters

string $name

setTextLimit()

setTextLimit(integer  $l = 150) : void

Set maximum characters lenght for text shortening

Parameters

integer $l

setShortening()

setShortening(boolean  $b = false) : void

Turn on/off text shortening for item content

Parameters

boolean $b

addNamespace()

addNamespace(string  $n) : void

Add namespace

Parameters

string $n

getNamespaces()

getNamespaces() : void

Get all namespaces

setDateFormat()

setDateFormat(string  $format = "datetime") : void

Setter for dateFormat

Parameters

string $format

formatDate()

formatDate(\string/integer  $date,   $format = "atom") : string

Format datetime string, timestamp integer or carbon object in valid feed format

Parameters

\string/integer $date
$format

Returns

string