id("http://gallery.example.com/comments") ->title("Comments on Ocean Beach Sunset", "text") ->updated(time()); $feed->link() ->rel("self") ->href("http://gallery.example.com/comments"); $feed->link() ->rel("related") ->type("application/atom+xml") ->title("Get photo meta data") ->href("http://gallery.example.com/photos/23"); $feed->link() ->rel("related") ->type("image/jpeg") ->title("Download photo") ->href("http://gallery.example.com/photos/SanFran/sunset.jpg"); $feed->entry() ->id("http://gallery.example.com/comments/32") ->updated(time()) ->title("") ->content("Wow, that's <b>beautiful<b>!", "html") ->author() ->name("Jonathan Doe") ->email("jdoe@example.com") ->uri("http://gallery.example.com"); $xml = $feed->as_xml(); // file_put_contents("atom-feed.xml", $xml); // Kohana::log("debug", "{$xml}"); } public function atom_entry_test() { $entry = new Atom_Entry("entry"); $entry->id("http://gallery.example.com/comments/32") ->title("Comment on Ocean Beach Sunset", "text") ->updated(time()) ->content("Wow, that's <b>beautiful<b>!", "html") ->author() ->name("Jonathan Doe") ->email("jdoe@example.com") ->uri("http://gallery.example.com"); $entry->link() ->rel("self") ->href("http://gallery.example.com/comments/32"); $entry->link() ->rel("related") ->type("application/atom+xml") ->title("Get photo meta data") ->href("http://gallery.example.com/photos/23"); $entry->link() ->rel("related") ->type("text/html") ->title("View photo in Gallery") ->href("http://gallery.example.com/photos/23"); $entry->link() ->rel("related") ->type("image/jpeg") ->title("Download photo") ->href("http://gallery.example.com/photos/SanFran/sunset.jpg"); $xml = $entry->as_xml(); // file_put_contents("atom-entry.xml", $xml); // Kohana::log("debug", "{$xml}"); } }