bridges: Remove getCacheDuration if default

BridgeAbstract will return 3600 seconds by default, so the function
can be removed from any bridge implementing getCacheDuration
returning the same value.

Documentation updated accordingly.
This commit is contained in:
logmanoriginal 2016-08-06 16:17:58 +02:00
parent 1d53b70272
commit 5ad157d2fd
28 changed files with 20 additions and 130 deletions

View file

@ -169,6 +169,8 @@ This function returns the URI to the destination site of the bridge. It will be
This function returns the time in **seconds** during which rss-bridge will output cached values instead of re-generating a RSS feed.
**Notice:** rss-bridge will return `3600` seconds (1 hour) by default, so you only have to implement this function if you require different timing!
```PHP
public function getCacheDuration(){
return 3600; // 1 hour
@ -214,7 +216,7 @@ $html = $this->file_get_html('your URI');
# Template
This is a template for a new bridge:
This is the minimum template for a new bridge:
```PHP
<?php
@ -238,10 +240,6 @@ class MySiteBridge extends BridgeAbstract{
public function getURI(){
return ''; // Insert your URI here!
}
public function getCacheDuration(){
return 3600; // 1 hour
}
}
```

View file

@ -9,7 +9,7 @@ class ABCTabsBridge extends BridgeAbstract{
$this->name = "ABC Tabs Bridge";
$this->uri = "http://www.abc-tabs.com/";
$this->description = "Returns 22 newest tabs";
$this->update = "2014-07-23";
$this->update = "2016-08-06";
}
@ -41,8 +41,4 @@ class ABCTabsBridge extends BridgeAbstract{
return "http://www.abc-tabs.com/";
}
public function getCacheDuration(){
return 3600; // 1 hour
}
}

View file

@ -47,8 +47,4 @@ class CommonDreamsBridge extends BridgeAbstract{
public function getURI(){
return 'http://www.commondreams.org/';
}
public function getCacheDuration(){
return 3600; // 1 hours
}
}

View file

@ -7,7 +7,7 @@ class EZTVBridge extends BridgeAbstract{
$this->name = "EZTV";
$this->uri = "https://eztv.ch/";
$this->description = "Returns list of *recent* torrents for a specific show on EZTV. Get showID from URLs in https://eztv.ch/shows/showID/show-full-name.";
$this->update = "2014-01-20";
$this->update = "2016-08-06";
$this->parameters[] =
'[
@ -80,8 +80,4 @@ class EZTVBridge extends BridgeAbstract{
public function getURI(){
return 'https://eztv.ch/';
}
public function getCacheDuration(){
return 3600; // 1 hour
}
}

View file

@ -49,8 +49,4 @@ class FootitoBridge extends BridgeAbstract{
public function getURI(){
return 'http://www.footito.fr/';
}
public function getCacheDuration(){
return 3600; // 1h hours
}
}

View file

@ -7,7 +7,7 @@ class FuturaSciencesBridge extends BridgeAbstract {
$this->name = $this->getName();
$this->uri = $this->getURI();
$this->description = 'Returns the newest articles.';
$this->update = '2016-08-03';
$this->update = '2016-08-06';
$this->parameters[] =
'[
@ -226,8 +226,4 @@ class FuturaSciencesBridge extends BridgeAbstract {
public function getURI() {
return 'http://www.futura-sciences.com/';
}
public function getCacheDuration() {
return 3600;
}
}

View file

@ -12,7 +12,7 @@ class GitlabCommitsBridge extends BridgeAbstract{
$this->name = 'Gitlab Commits';
$this->uri = '';
$this->description = 'Returns the commits of a project hosted on a gitlab instance';
$this->update = '2016-06-19';
$this->update = '2016-08-06';
$this->parameters[] =
'[
@ -87,8 +87,4 @@ class GitlabCommitsBridge extends BridgeAbstract{
public function getURI(){
return '';
}
public function getCacheDuration(){
return 3600; // one hour
}
}

View file

@ -39,8 +39,4 @@ class GuruMedBridge extends BridgeAbstract{
public function getURI(){
return 'http://gurumed.org/';
}
public function getCacheDuration(){
return 3600; // 1 hour
}
}

View file

@ -9,7 +9,7 @@ class InstagramBridge extends BridgeAbstract{
$this->name = "Instagram Bridge";
$this->uri = "http://instagram.com/";
$this->description = "Returns the newest images";
$this->update = "2014-05-25";
$this->update = "2016-08-06";
$this->parameters[] =
'[
@ -81,8 +81,4 @@ class InstagramBridge extends BridgeAbstract{
public function getURI(){
return 'http://instagram.com/';
}
public function getCacheDuration(){
return 3600;
}
}

View file

@ -46,8 +46,4 @@ class KoreusBridge extends BridgeAbstract{
public function getURI(){
return 'http://www.koreus.com/';
}
public function getCacheDuration(){
return 3600; // 1 hour
}
}

View file

@ -7,7 +7,7 @@ class LeBonCoinBridge extends BridgeAbstract{
$this->name = "LeBonCoin";
$this->uri = "http://www.leboncoin.fr";
$this->description = "Returns most recent results from LeBonCoin for a region, and optionally a category and a keyword .";
$this->update = "2016-05-02";
$this->update = "2016-08-06";
$this->parameters[] =
'[
@ -283,8 +283,4 @@ class LeBonCoinBridge extends BridgeAbstract{
public function getURI(){
return 'http://www.leboncoin.fr';
}
public function getCacheDuration(){
return 3600; // 1 hour
}
}

View file

@ -37,8 +37,4 @@ class MsnMondeBridge extends BridgeAbstract{
public function getURI(){
return 'http://www.msn.com/fr-fr/actualite/monde';
}
public function getCacheDuration(){
return 3600; // 1 hour
}
}

View file

@ -6,7 +6,7 @@ class NakedSecurityBridge extends BridgeAbstract {
$this->name = $this->getName();
$this->uri = $this->getURI();
$this->description = 'Returns the newest articles.';
$this->update = '2016-04-30';
$this->update = '2016-08-06';
}
public function collectData(array $param) {
@ -77,8 +77,4 @@ class NakedSecurityBridge extends BridgeAbstract {
public function getURI() {
return 'https://nakedsecurity.sophos.com/';
}
public function getCacheDuration() {
return 3600; //1 hour
}
}

View file

@ -6,7 +6,7 @@ class NeuviemeArtBridge extends BridgeAbstract {
$this->name = "9ème Art";
$this->uri = "http://www.9emeart.fr/";
$this->description = "Returns the newest articles.";
$this->update = "2016-02-05";
$this->update = "2016-08-06";
}
public function collectData(array $param) {
@ -63,8 +63,4 @@ class NeuviemeArtBridge extends BridgeAbstract {
public function getURI() {
return 'http://www.9emeart.fr/';
}
public function getCacheDuration() {
return 3600; //1 hour
}
}

View file

@ -52,8 +52,4 @@ class NextInpactBridge extends BridgeAbstract {
public function getURI() {
return 'http://www.nextinpact.com/';
}
public function getCacheDuration() {
return 3600; // 1 hour
}
}

View file

@ -7,7 +7,7 @@ class NextgovBridge extends BridgeAbstract {
$this->name = $this->getName();
$this->uri = $this->getURI();
$this->description = 'USA Federal technology news, best practices, and web 2.0 tools.';
$this->update = '2016-07-20';
$this->update = '2016-08-06';
$this->parameters[] =
'[
@ -103,8 +103,4 @@ class NextgovBridge extends BridgeAbstract {
public function getURI() {
return 'https://www.nextgov.com/';
}
public function getCacheDuration() {
return 3600; //1 hour
}
}

View file

@ -53,8 +53,4 @@ class NiceMatinBridge extends BridgeAbstract{
public function getURI(){
return 'http://www.nicematin.com/';
}
public function getCacheDuration(){
return 3600; // 1 hour
}
}

View file

@ -11,7 +11,7 @@ class PinterestBridge extends BridgeAbstract{
$this->name = "Pinterest Bridge";
$this->uri = "http://www.pinterest.com/";
$this->description = "Returns the newest images on a board";
$this->update = "2014-05-25";
$this->update = "2016-08-06";
$this->parameters["By username and board"] =
'[
@ -114,8 +114,4 @@ class PinterestBridge extends BridgeAbstract{
public function getURI(){
return 'http://www.pinterest.com';
}
public function getCacheDuration(){
return 3600;
}
}

View file

@ -50,8 +50,4 @@ class ReporterreBridge extends BridgeAbstract{
public function getURI(){
return 'http://www.reporterre.net/';
}
public function getCacheDuration(){
return 3600; // 1 hours
}
}

View file

@ -7,7 +7,7 @@ class Rue89Bridge extends BridgeAbstract{
$this->name = "Rue89";
$this->uri = "http://rue89.nouvelobs.com/";
$this->description = "Returns the 5 newest posts from Rue89 (full text)";
$this->update = "2015-01-30";
$this->update = "2016-08-06";
}
@ -50,7 +50,4 @@ class Rue89Bridge extends BridgeAbstract{
public function getURI(){
return 'http://rue89.nouvelobs.com/';
}
public function getCacheDuration(){
return 3600; // 1 hour
}
}

View file

@ -117,8 +117,4 @@ class ShanaprojectBridge extends BridgeAbstract {
public function getURI(){
return 'http://www.shanaproject.com';
}
public function getCacheDuration(){
return 3600; // 1 hour
}
}

View file

@ -7,7 +7,7 @@ class T411Bridge extends BridgeAbstract {
$this->name = 'T411';
$this->uri = $this->getURI();
$this->description = 'Returns the 10 newest torrents with specified search terms <br /> Use url part after "?" mark when using their search engine.';
$this->update = '2016-06-25';
$this->update = '2016-08-06';
$this->parameters[] =
'[
@ -102,10 +102,5 @@ class T411Bridge extends BridgeAbstract {
public function getURI() {
return 'https://t411.ch/';
}
public function getCacheDuration() {
return 3600; // 1 hour
}
}

View file

@ -7,7 +7,7 @@ class TheHackerNewsBridge extends BridgeAbstract {
$this->name = $this->getName();
$this->uri = $this->getURI();
$this->description = 'Cyber Security, Hacking, Technology News.';
$this->update = '2016-07-22';
$this->update = '2016-08-06';
}
@ -83,8 +83,4 @@ class TheHackerNewsBridge extends BridgeAbstract {
public function getURI() {
return 'https://thehackernews.com/';
}
public function getCacheDuration() {
return 3600; //1 hour
}
}

View file

@ -7,7 +7,7 @@ class ThePirateBayBridge extends BridgeAbstract{
$this->name = "The Pirate Bay";
$this->uri = "https://thepiratebay.org/";
$this->description = "Returns results for the keywords. You can put several list of keywords by separating them with a semicolon (e.g. \"one show;another show\")";
$this->update = "2015-01-09";
$this->update = "2016-08-06";
$this->parameters[] =
'[
@ -88,8 +88,4 @@ class ThePirateBayBridge extends BridgeAbstract{
public function getURI(){
return 'https://thepiratebay.org/';
}
public function getCacheDuration(){
return 3600; // 1 hour
}
}

View file

@ -6,7 +6,7 @@ class WeLiveSecurityBridge extends BridgeAbstract {
$this->name = $this->getName();
$this->uri = $this->getURI();
$this->description = 'Returns the newest articles.';
$this->update = '2016-07-19';
$this->update = '2016-08-06';
}
public function collectData(array $param) {
@ -68,8 +68,4 @@ class WeLiveSecurityBridge extends BridgeAbstract {
public function getURI() {
return 'http://www.welivesecurity.com/';
}
public function getCacheDuration() {
return 3600; //1 hour
}
}

View file

@ -101,8 +101,4 @@ class WorldOfTanks extends HttpCachingBridgeAbstract{
public function getURI(){
return $this->uri;
}
public function getCacheDuration(){
return 3600; // 2h hours
}
}

View file

@ -7,7 +7,7 @@ class ZDNetBridge extends BridgeAbstract {
$this->name = $this->getName();
$this->uri = $this->getURI();
$this->description = 'Technology News, Analysis, Comments and Product Reviews for IT Professionals.';
$this->update = '2016-07-20';
$this->update = '2016-08-06';
$this->parameters[] =
// http://www.zdnet.com/zdnet.opml
@ -310,8 +310,4 @@ class ZDNetBridge extends BridgeAbstract {
public function getURI() {
return 'http://www.zdnet.com/';
}
public function getCacheDuration() {
return 3600; //1 hour
}
}

View file

@ -7,7 +7,7 @@ class ZoneTelechargementBridge extends BridgeAbstract {
$this->name = $this->getName();
$this->uri = $this->getURI();
$this->description = 'RSS proxy returning the newest releases.<br />You may specify a category found in RSS URLs, else main feed is selected.';
$this->update = "2016-03-16";
$this->update = "2016-08-06";
$this->parameters[] =
'[
@ -51,8 +51,4 @@ class ZoneTelechargementBridge extends BridgeAbstract {
public function getURI() {
return 'https://www.zone-telechargement.com/';
}
public function getCacheDuration() {
return 3600;
}
}