From 7485740d9741021b2016df80b225ae4d82b892d0 Mon Sep 17 00:00:00 2001 From: Jozef Selesi Date: Sun, 23 Nov 2008 12:41:41 +0000 Subject: Changed and extended the Atom library a little so that the code for creating entries and feeds has been considerably simplified and reduced. --- modules/atom/libraries/Gallery_Atom_Link.php | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 modules/atom/libraries/Gallery_Atom_Link.php (limited to 'modules/atom/libraries/Gallery_Atom_Link.php') diff --git a/modules/atom/libraries/Gallery_Atom_Link.php b/modules/atom/libraries/Gallery_Atom_Link.php new file mode 100644 index 00000000..abcd3bc9 --- /dev/null +++ b/modules/atom/libraries/Gallery_Atom_Link.php @@ -0,0 +1,45 @@ +rel("related") + ->type(rest::ATOM) + ->title($title) + ->href(sprintf("%s%s", atom::get_base_url(), $relative_uri)); + return $this; + } + + public function related_image($relative_uri, $title="", $image_type="jpeg") { + if (empty($title)) { + $title = _("Get related image"); + } + + $this->rel("related") + ->type("image/" . $image_type) + ->title($title) + ->href(sprintf("%s%s", atom::get_base_url(), $relative_uri)); + return $this; + } +} -- cgit v1.2.3