Esempio n. 1
0
 /**
  * When you call the class, an array is expected with information on the
  * Channel
  *
  * The array must have three elements: title, link, and description. These
  * are required for a valid RSS file.
  *
  * The only task this function (the constructor) performs is initializing
  * the document.
  *
  * @param array $info  Consists of three elements: title, link, and description
  * @return void
  */
 function RSS($info = array())
 {
     if (!isset($info['title']) or !isset($info['link']) or !isset($info['description'])) {
         die('You must provide a Title, Link, and Description');
     }
     // Start the feed
     parent::XML();
     $this->openTag('rss', array('version' => '2.0'));
     $this->openTag('channel');
     // Add the tags
     foreach ($info as $tag => $val) {
         $this->openTag($tag, null, false, false);
         $this->addValue($val);
         $this->closeTag(false);
     }
 }
Esempio n. 2
0
 /**
  * Constructor
  * @param string $error
  */
 function PosnetXML()
 {
     parent::XML();
     $this->error = "";
 }