Proposal for a XML_Atom Library in the PEAR packages

From: Date: Fri, 05 Sep 2008 13:26:21 +0000
Subject: Proposal for a XML_Atom Library in the PEAR packages
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-50715@lists.php.net to get a copy of this message
Hello, First of all, i would like to apologize for my english mistakes. In order to build a server-side implementation of the ATOM publishing protocol, i , first, planned to make a library which could easily handle any Atom feed: - By converting an Atom feed in a PHP Atom_object - By converting a PHP Atom_Object in an Atom feed For sure, this library will strictly follow the Atom Syndication Format. From now here is an example of implementation: $feed=new Atom_Feed(); $feed->addAttribute('class','test'); * $feed->setTitle(new Atom_Title('Example Feed', array('key'=>'value'))); * $feed->addLink(new Atom_Link(null,array('href'=>'http://example.org/')) ); $feed->setUpdated(new Atom_Updated(new DateTime('2003-12-13 18:30:02 GMT'))); $feed->addAuthor(new Atom_Author('John Doe')); $feed->setId(new Atom_Id('urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6')); $entry = new Atom_Entry(); $entry->setTitle(new Atom_Title('Atom-Powered Robots Run Amok')); $entry->addLink(new Atom_Link(null,array('href'=>' http://example.org/2003/12/13/atom03'))); $entry->setId(new Atom_Id('urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a')); $entry->setUpdated(new Atom_Updated(new DateTime('2003-12-13 18:30:02 GMT'))); $entry->setSummary(new Atom_Summary('Some text.')); $feed->addEntry($entry); You may be think at a first glance, that this implementation is too complex. Therefore, I also planned to enable that kind of syntax *$feed->setTitle('Example feed', array('key'=>'value'))* I think this second example could be more pleasant to implement, but the good thing in the first example, is that we control the type of the parameter Therefore i would like to have your opinion and may be your approval for that project, before trying to create an account on the PEAR website. Thanks a lot for your answers.

« previous php.pear.dev (#50715) next »