diff options
| author | Jozef Selesi <jozefs@users.sourceforge.net> | 2008-11-23 12:41:41 +0000 |
|---|---|---|
| committer | Jozef Selesi <jozefs@users.sourceforge.net> | 2008-11-23 12:41:41 +0000 |
| commit | 7485740d9741021b2016df80b225ae4d82b892d0 (patch) | |
| tree | 9363326a831141fde66c31665af4fb2bacdec3db /modules/atom/libraries/Atom_Feed.php | |
| parent | bdbb115296f4002186ee3a99fadc13988dd1509f (diff) | |
Changed and extended the Atom library a little so that the code for creating entries and feeds has been considerably simplified and reduced.
Diffstat (limited to 'modules/atom/libraries/Atom_Feed.php')
| -rw-r--r-- | modules/atom/libraries/Atom_Feed.php | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/modules/atom/libraries/Atom_Feed.php b/modules/atom/libraries/Atom_Feed.php index 8efeb4f2..9625f951 100644 --- a/modules/atom/libraries/Atom_Feed.php +++ b/modules/atom/libraries/Atom_Feed.php @@ -25,12 +25,14 @@ class Atom_Feed_Core extends Atom_Base { } public function title($title) { + /* @todo Add optional type argument that defaults to "text" */ $this->element->appendChild($this->dom->createElement("title", $title)); return $this; } - public function updated($updated) { - $this->element->appendChild($this->dom->createElement("updated", $updated)); + public function updated($timestamp) { + $this->element->appendChild( + $this->dom->createElement("updated", atom::unix_to_internet_timestamp($timestamp))); return $this; } @@ -42,9 +44,4 @@ class Atom_Feed_Core extends Atom_Base { /* Create new empty entry. */ return $this->add_child("Atom_Entry", "entry"); } - - public function append_entry($atom_entry) { - /* Append an exising entry. */ - $this->element->appendChild($atom_entry->get_element()); - } } |
