<?php
require_once 'lib/class.zend.eps_feed_writer.inc';
/**
* Feed example.
* Atom and RSS are almost identical except for a few minor differences.
* ZF will tell you if something is wrong during the export phase.
* A feed validator service will also point out any problems.
* Review the documentation for all functionality.
*/
$feed = new Zend_EPS_Feed_Writer('Everett Public Schools','http://vector/feeds/tr.xml');
$feed->setFeedAuthor(array('name'=>'Otto Mated, IST Operations','email'=>'automated@everettsd.org'));
$feed->setFeedCopyright(sprintf("%d, %s",date("Y"),'Everett Public Schools'));
$feed->setFeedDescription('Import Log Feed Example');
$feed->setFeedLogo(array('uri'=>'http://plondar/images/folder_open.gif','link'=>'http://www.ipassey.com','title'=>'a logo','description'=>'my logo description'));
$feed->getEntry('The first entry','http://vector/feeds/xml/9x7odzf62b.xml');
$feed->setEntryDescription('The is the short description of this entry.');
$feed->setEntryContent('This is the long description of the entry. Both descriptions can also contain some HTML.');
$feed->setEntryAuthor(array('name'=>'David Passey','email'=>'dpassey@everettsd.org'));
$feed->setEntryCategory(array('term'=>'PHP','label'=>'PHP Classes','scheme'=>'http://www.phpclasses.org'));
$feed->setEntry();
$str = $feed->exec();
/** Spit it out to the console and/or put it into a file for validation. **/
echo $str;
file_put_contents('c:\tmp\myfeed.xml',$str);
?>
|