BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
RSSCreator Class Reference

Public Member Functions

 addItem ($item)
 
 buildOutput ()
 
 addCategory ($categorie, $domain=false)
 
 setCloud ($domain, $path, $port, $protocol, $registerProcedure)
 
 setCopyright ($copyright)
 
 setImage ($link, $title, $url, $description=false, $height=false, $width=false)
 
 setLanguage ($language)
 
 setLastBuildDate ($timestamp)
 
 setManagingEditor ($email_addr, $name=false)
 
 setPubDate ($timestamp)
 
 setPICSLabel ($rating)
 
 setSkipDays ($days)
 
 setSkipHours ($hours)
 
 setTTL ($ttl)
 
 setWebmaster ($email_addr)
 

Static Public Member Functions

static testURL ($url)
 
static createChannel ($title, $link, $description)
 
static xmlEncode ($string)
 

Protected Member Functions

 __construct ($title, $link, $description)
 
 createElementOn (&$target, $tag, $attributes=false, $content=false, $cdata=false)
 

Protected Attributes

 $channel
 
 $items = array()
 
 $dom = false
 

Static Protected Attributes

static $URISchemes
 

Constructor & Destructor Documentation

RSSCreator::__construct (   $title,
  $link,
  $description 
)
protected

constructor of RSSCreator class

Parameters
string$titlethe title of the channel
string$linkthe link to the channel
string$descriptionthe description of the channel

Member Function Documentation

RSSCreator::addCategory (   $categorie,
  $domain = false 
)

add a category to the channel

Parameters
string$categorie
string$domain
RSSCreator::addItem (   $item)

add a new item to the channel

Parameters
DomNode$item
RSSCreator::buildOutput ( )

build and return the xml output for the channel

Returns
string
static RSSCreator::createChannel (   $title,
  $link,
  $description 
)
static

Creates a new RSS channel from the given data and returns a new RSSCreator instance which holds the created channel. If an error occurs, false will be returned.

Parameters
string$titlethe title of the channel
string$linkthe link to the channel
string$descriptionthe description of the channel
Returns
RSSCreator
RSSCreator::createElementOn ( $target,
  $tag,
  $attributes = false,
  $content = false,
  $cdata = false 
)
protected

create a new element in the channels dom

Parameters
DomNode$target
string$tag
array$attributes
string$content
bool$cdata
Returns
DomNode
RSSCreator::setCloud (   $domain,
  $path,
  $port,
  $protocol,
  $registerProcedure 
)

set the cloud of the channel

Parameters
string$domain
string$path
int$port
string$protocol
string$registerProcedure
RSSCreator::setCopyright (   $copyright)

set the copyright informations for the channel

Parameters
string$copyright
RSSCreator::setImage (   $link,
  $title,
  $url,
  $description = false,
  $height = false,
  $width = false 
)

set an image for this channel

Parameters
string$link
string$title
string$url
string$description
int$height
int$width
RSSCreator::setLanguage (   $language)

set the language code for the channel

Parameters
string$language
RSSCreator::setLastBuildDate (   $timestamp)

set the timestamp of the last build date of the channel

Parameters
int$timestamp
RSSCreator::setManagingEditor (   $email_addr,
  $name = false 
)

set the details of the managing editor

Parameters
string$email_addr
string$name
RSSCreator::setPICSLabel (   $rating)

set the PICS label

Parameters
string$rating
RSSCreator::setPubDate (   $timestamp)

set the puplication date

Parameters
int$timestamp
RSSCreator::setSkipDays (   $days)

set the weekdays where the channel will not be updated

Parameters
string$daysa comma seperated list of weekdays (i.e. 'Monday, Saturday, Sunday')
RSSCreator::setSkipHours (   $hours)

set the hours where the channel will not be updated

Parameters
string$hoursa comma seperated list of hours (i.e. '23, 0, 1, 2, 3, 4, 12, 13')
RSSCreator::setTTL (   $ttl)

set the number of minutes, the channel should be cached

Parameters
int$ttl
RSSCreator::setWebmaster (   $email_addr)

set the email adress of the webmaster of the channel

Parameters
string$email_addr
static RSSCreator::testURL (   $url)
static

Tests the syntactical correctness of a given URL.

Parameters
string$url
Returns
boolean
static RSSCreator::xmlEncode (   $string)
static

Escapes the given string for usage in XML.

Parameters
string$string
Returns
string

Member Data Documentation

RSSCreator::$channel
protected
Initial value:
= array('title' => false,
'link' => false,
'description' => false,
'categories' => array(),
'cloud' => array('domain' => false,
'path' => false,
'port' => false,
'protocol' => false,
'registerProcedure' => false),
'copyright' => false,
'docs' => 'http://www.rssboard.org/rss-specification',
'generator' => 'BlueSpice RSSCreator',
'image' => array('link' => false,
'title' => false,
'url' => false,
'description' => false,
'height' => false,
'width' => false),
'language' => 'de-de',
'lastBuildDate' => false,
'managingEditor' => array('name' => false,
'email_addr' => false),
'pubDate' => false,
'rating' => false,
'skipDays' => array(),
'skipHours' => array(),
'ttl' => 60,
'webMaster' => false)
RSSCreator::$URISchemes
staticprotected
Initial value:
= array('aaa','aaas','acap','cap','cid','crid','data','dav','dict','dns','fax','file','ftp','go',
'gopher','h323','http','https','iax','icap','im','imap','info','ipp','iris','iris\.beep',
'iris\.xpc','iris\.xpcs','iris\.lwz','ldap','mailto','mid','modem','msrp','msrps','mtqp',
'mupdate','news','nfs','nntp','opaquelocktoken','pop','pres','rtsp','service','shttp',
'sieve','sip','sips','snmp','soap\.beep','soap\.beeps','tag','tel','telnet','tftp',
'thismessage','tip','tv','urn','vemmi','xmlrpc\.beep','xmlrpc\.beeps','xmpp','z39\.50r','z39\.50s')

The documentation for this class was generated from the following file: