diff --git a/lib/Services/Delicious.php b/lib/Services/Delicious.php
index b47c9d8..431159f 100644
--- a/lib/Services/Delicious.php
+++ b/lib/Services/Delicious.php
@@ -1,23 +1,43 @@
setItemTemplate('
{{{title}}}'."\n");
- }
+ public function __construct( $config ){
+ $config['link'] = 'http://delicious.com/'.$config['username'].'/';
+ $config['url'] = sprintf( 'http://feeds.delicious.com/v2/rss/%s?count=%s', $config['username'], $config['total'] );
+ parent::__construct( $config );
+ $this->setItemTemplate(
+ '
+ {{{title}}}
+ ({{{date}}})
+ {{#category}}
+ {{{category}}}
+ {{/category}}
+ '."\n"
+ );
+ }
- }
+ /**
+ * @return array
+ * @since 20110531
+ */
+ public function processDataItem( $item ) {
+ $item = parent::processDataItem($item);
+ $item['service_link'] = $this->getConfigValue('link');
+ return $item;
+ }
+}
diff --git a/lib/Services/Feed.php b/lib/Services/Feed.php
index 7a2006b..8566543 100644
--- a/lib/Services/Feed.php
+++ b/lib/Services/Feed.php
@@ -86,7 +86,7 @@ public function populateItemTemplate( &$item ) {
* @return array
* @since 20110531
*/
- public function processDataItem( &$item ) {
+ public function processDataItem( $item ) {
// meta
diff --git a/lib/Services/Service.php b/lib/Services/Service.php
index 4d1de2d..9d3dbdb 100644
--- a/lib/Services/Service.php
+++ b/lib/Services/Service.php
@@ -62,6 +62,18 @@ public function __construct( $config=array() ) {
}
}
+ /**
+ * @since 2011-11-13
+ */
+ public function getConfigValue($key)
+ {
+ if (isset($this->configuration[$key])) {
+ return $this->configuration[$key];
+ }
+
+ return null;
+ }
+
/**
* Use timeshift factor to randomize range of cache invalidation time.
* Default: 0.5 (with 1h cache it means 0.5h to 1.5h)