PHP Interface Suin\RSSWriter\ItemInterface

显示文件 Open project: suin/php-rss-writer

Public Methods

Method Description
appendTo ( Suin\RSSWriter\ChannelInterface $channel ) Append item to the channel
asXML ( ) : SimpleXMLElement Return XML object
author ( string $author ) Set the author
category ( string $name, string $domain = null ) Set item category
contentEncoded ( string $content ) Set content:encoded
description ( string $description ) Set item description
enclosure ( string $url, integer $length, string $type = 'audio/mpeg' ) Set enclosure
guid ( string $guid, boolean $isPermalink = false ) Set GUID
pubDate ( integer $pubDate ) Set published date
title ( string $title ) Set item title
url ( string $url ) Set item URL

Method Details

appendTo() public method

Append item to the channel
public appendTo ( Suin\RSSWriter\ChannelInterface $channel )
$channel Suin\RSSWriter\ChannelInterface

asXML() public method

Return XML object
public asXML ( ) : SimpleXMLElement
return SimpleXMLElement

author() public method

Set the author
public author ( string $author )
$author string Email of item author

category() public method

Set item category
public category ( string $name, string $domain = null )
$name string Category name
$domain string Category URL

contentEncoded() public method

Set content:encoded
public contentEncoded ( string $content )
$content string

description() public method

Set item description
public description ( string $description )
$description string

enclosure() public method

Set enclosure
public enclosure ( string $url, integer $length, string $type = 'audio/mpeg' )
$url string Url to media file
$length integer Length in bytes of the media file
$type string Media type, default is audio/mpeg

guid() public method

Set GUID
public guid ( string $guid, boolean $isPermalink = false )
$guid string
$isPermalink boolean

pubDate() public method

Set published date
public pubDate ( integer $pubDate )
$pubDate integer Unix timestamp

title() public method

Set item title
public title ( string $title )
$title string

url() public method

Set item URL
public url ( string $url )
$url string