aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/feedwriter/DummySingleItemFeed.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-25 12:12:53 -0700
committerNicolas LÅ“uillet <nicolas.loeuillet@gmail.com>2013-08-25 12:12:53 -0700
commitc51be6b697da573cdcf0788eb8617130ce5517a4 (patch)
tree642eaf70afb134dee5f274c84bf15b8aab00c117 /inc/3rdparty/feedwriter/DummySingleItemFeed.php
parent7ba37bd91a43321196e6d867caf9e298e82c6d6c (diff)
parent063fc1a7baaf6f7e1fb08eced058962a6140a471 (diff)
downloadwallabag-c51be6b697da573cdcf0788eb8617130ce5517a4.tar.gz
wallabag-c51be6b697da573cdcf0788eb8617130ce5517a4.tar.zst
wallabag-c51be6b697da573cdcf0788eb8617130ce5517a4.zip
Merge pull request #181 from inthepoche/dev
beta4
Diffstat (limited to 'inc/3rdparty/feedwriter/DummySingleItemFeed.php')
-rw-r--r--inc/3rdparty/feedwriter/DummySingleItemFeed.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/inc/3rdparty/feedwriter/DummySingleItemFeed.php b/inc/3rdparty/feedwriter/DummySingleItemFeed.php
new file mode 100644
index 00000000..5f2f871e
--- /dev/null
+++ b/inc/3rdparty/feedwriter/DummySingleItemFeed.php
@@ -0,0 +1,24 @@
1<?php
2// create single item dummy feed object
3class DummySingleItemFeed {
4 public $item;
5 function __construct($url) { $this->item = new DummySingleItem($url); }
6 public function get_title() { return ''; }
7 public function get_description() { return 'Content extracted from '.$this->item->url; }
8 public function get_link() { return $this->item->url; }
9 public function get_language() { return false; }
10 public function get_image_url() { return false; }
11 public function get_items($start=0, $max=1) { return array(0=>$this->item); }
12}
13class DummySingleItem {
14 public $url;
15 function __construct($url) { $this->url = $url; }
16 public function get_permalink() { return $this->url; }
17 public function get_title() { return ''; }
18 public function get_date($format='') { return false; }
19 public function get_author($key=0) { return null; }
20 public function get_authors() { return null; }
21 public function get_description() { return ''; }
22 public function get_enclosure($key=0, $prefer=null) { return null; }
23 public function get_enclosures() { return null; }
24} \ No newline at end of file