diff --git a/CREATE_BRIDGE.md b/CREATE_BRIDGE.md
index 748ab3c..efe4286 100644
--- a/CREATE_BRIDGE.md
+++ b/CREATE_BRIDGE.md
@@ -9,8 +9,8 @@ Read the following chapters an make sure to read the [Guidelines](#guidelines)!
A rss bridge must extend the `BridgeAbstract` class and implement the following functions :
-* [`loadMetadatas`](#the-loadmetadatas-function)
-* [`collectData`](#the-collectdata-function)
+* [`loadMetadatas`](#the-loadmetadatas-function) (**required**)
+* [`collectData`](#the-collectdata-function) (**required**)
* [`getName`](#the-getname-function)
* [`getURI`](#the-geturi-function)
* [`getCacheDuration`](#the-getcacheduration-function)
@@ -149,9 +149,11 @@ Parameter | ATOM | HTML | (M)RSS
This function returns the name of the bridge as it will be displayed on the main page of rss-bridge or on top of the feed output (HTML, ATOM, etc...).
+**Notice:** rss-bridge will by default return `$this->name` which is defined in the [`loadMetadatas`](#the-loadmetadatas-function) function, so you only have to implement this function if you require different behavior!
+
```PHP
public function getName(){
- return ''; // Insert your bridge name here!
+ return $this->name;
}
```
@@ -159,9 +161,11 @@ This function returns the name of the bridge as it will be displayed on the main
This function returns the URI to the destination site of the bridge. It will be used on the main page of rss-bridge when clicking your bridge name.
+**Notice:** rss-bridge will by default return `$this->uri` which is defined in the [`loadMetadatas`](#the-loadmetadatas-function) function, so you only have to implement this function if you require different behavior!
+
```PHP
public function getURI(){
- return ''; // Insert your URI here!
+ return $this->uri;
}
```
@@ -169,6 +173,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
@@ -196,7 +202,7 @@ Check the [list of error codes](https://en.wikipedia.org/wiki/List_of_HTTP_statu
## The `file_get_html` function
-This function is a wrapper around the simple_html_dom file_get_html function in order to provide context by design. It is considered good practice to use this function.
+This function is a wrapper around the [simple_html_dom](http://simplehtmldom.sourceforge.net/) [file_get_html](http://simplehtmldom.sourceforge.net/manual_api.htm#api) function in order to provide context by design. It is considered good practice to use this function.
```PHP
$html = $this->file_get_html('your URI');
@@ -214,15 +220,15 @@ $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
maintainer = 'No maintainer';
- $this->name = $this->getName();
- $this->uri = $this->getURI();
+ $this->name = 'Unnamed bridge';
+ $this->uri = '';
$this->description = 'No description provided';
$this->parameters = array();
}
@@ -230,18 +236,6 @@ class MySiteBridge extends BridgeAbstract{
public function collectData(array $params){
// Implement your bridge here!
}
-
- public function getName(){
- return ''; // Insert your bridge name here!
- }
-
- public function getURI(){
- return ''; // Insert your URI here!
- }
-
- public function getCacheDuration(){
- return 3600; // 1 hour
- }
}
```
diff --git a/bridges/ABCTabsBridge.php b/bridges/ABCTabsBridge.php
index 591cca3..9ab3e9c 100644
--- a/bridges/ABCTabsBridge.php
+++ b/bridges/ABCTabsBridge.php
@@ -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
- }
}
diff --git a/bridges/AllocineFRBridge.php b/bridges/AllocineFRBridge.php
index 7270b97..c54edff 100644
--- a/bridges/AllocineFRBridge.php
+++ b/bridges/AllocineFRBridge.php
@@ -10,7 +10,7 @@ class AllocineFRBridge extends BridgeAbstract{
$this->name = "Allo Cine : Faux Raccord";
$this->uri = "http://www.allocine.fr/video/programme-12284/saison-24580/";
$this->description = "Allo Cine : Faux Raccord";
- $this->update = "07/11/2013";
+ $this->update = "2016-08-06";
}
@@ -50,8 +50,5 @@ class AllocineFRBridge extends BridgeAbstract{
public function getCacheDuration(){
return 25200; // 7 hours
}
- public function getDescription(){
- return "Allo Cine : " . $this->_NOM . " via rss-bridge";
- }
}
?>
diff --git a/bridges/AllocineT5Bridge.php b/bridges/AllocineT5Bridge.php
index 4c13cdf..2dd1d81 100644
--- a/bridges/AllocineT5Bridge.php
+++ b/bridges/AllocineT5Bridge.php
@@ -10,7 +10,7 @@ class AllocineT5Bridge extends BridgeAbstract{
$this->name = "Allo Cine : Top 5";
$this->uri = "http://www.allocine.fr/video/programme-12299/saison-22542/";
$this->description = "Allo Cine : Top 5 via rss-bridge";
- $this->update = "07/11/2013";
+ $this->update = "2016-08-06";
}
@@ -50,8 +50,5 @@ class AllocineT5Bridge extends BridgeAbstract{
public function getCacheDuration(){
return 25200; // 7 hours
}
- public function getDescription(){
- return "Allo Cine : " . $this->_NOM . " via rss-bridge";
- }
}
?>
diff --git a/bridges/AllocineTueursEnSerieBridge.php b/bridges/AllocineTueursEnSerieBridge.php
index 6a27e61..d4330ec 100644
--- a/bridges/AllocineTueursEnSerieBridge.php
+++ b/bridges/AllocineTueursEnSerieBridge.php
@@ -10,7 +10,7 @@ class AllocineTueursEnSerieBridge extends BridgeAbstract{
$this->name = "Allo Cine : Tueurs En Serie";
$this->uri = "http://www.allocine.fr/video/programme-12286/saison-22938/";
$this->description = "Allo Cine : Tueurs En Serie";
- $this->update = "12/11/2013";
+ $this->update = "2016-08-06";
}
@@ -50,8 +50,5 @@ class AllocineTueursEnSerieBridge extends BridgeAbstract{
public function getCacheDuration(){
return 25200; // 7 hours
}
- public function getDescription(){
- return "Allo Cine : " . $this->_NOM . " via rss-bridge";
- }
}
?>
diff --git a/bridges/BlaguesDeMerdeBridge.php b/bridges/BlaguesDeMerdeBridge.php
index ca87242..126ca82 100644
--- a/bridges/BlaguesDeMerdeBridge.php
+++ b/bridges/BlaguesDeMerdeBridge.php
@@ -7,7 +7,7 @@ class BlaguesDeMerdeBridge extends BridgeAbstract{
$this->name = "Blagues De Merde";
$this->uri = "http://www.blaguesdemerde.fr/";
$this->description = "Blagues De Merde";
- $this->update = "16/10/2013";
+ $this->update = "2016-08-06";
}
@@ -43,8 +43,5 @@ class BlaguesDeMerdeBridge extends BridgeAbstract{
public function getCacheDuration(){
return 7200; // 2h hours
}
- public function getDescription(){
- return "Blagues De Merde via rss-bridge";
- }
}
?>
diff --git a/bridges/CADBridge.php b/bridges/CADBridge.php
index 90b338c..299bd10 100644
--- a/bridges/CADBridge.php
+++ b/bridges/CADBridge.php
@@ -5,10 +5,10 @@ class CADBridge extends BridgeAbstract{
$this->name = "CAD Bridge";
$this->uri = "http://www.cad-comic.com/";
$this->description = "Returns the newest articles.";
- $this->update = "2016-08-02";
+ $this->update = "2016-08-06";
}
- function CADExtractContent($url) {
+ private function CADExtractContent($url) {
$html3 = $this->file_get_html($url);
// The request might fail due to missing https support or wrong URL
diff --git a/bridges/CNETBridge.php b/bridges/CNETBridge.php
index ea0898a..5b0a8d5 100644
--- a/bridges/CNETBridge.php
+++ b/bridges/CNETBridge.php
@@ -9,7 +9,7 @@ class CNETBridge extends BridgeAbstract {
$this->name = 'CNET News';
$this->uri = 'http://www.cnet.com/';
$this->description = 'Returns the newest articles.
You may specify a topic found in some section URLs, else all topics are selected.';
- $this->update = '2016-03-16';
+ $this->update = '2016-08-06';
$this->parameters[] =
'[
@@ -96,12 +96,7 @@ class CNETBridge extends BridgeAbstract {
return 'CNET News Bridge'.(empty($this->topicName) ? '' : ' - '.$this->topicName);
}
- public function getURI() {
- return 'http://www.cnet.com/';
- }
-
public function getCacheDuration() {
return 1800; // 30 minutes
- // return 0;
}
}
diff --git a/bridges/CastorusBridge.php b/bridges/CastorusBridge.php
index 55ff7b7..a6ac5f4 100644
--- a/bridges/CastorusBridge.php
+++ b/bridges/CastorusBridge.php
@@ -5,7 +5,7 @@ class CastorusBridge extends BridgeAbstract {
$this->name = "Castorus Bridge";
$this->uri = $this->getURI();
$this->description = "Returns the latest changes";
- $this->update = "2016-08-05";
+ $this->update = "2016-08-06";
$this->parameters["Get latest changes"] = '[]';
$this->parameters["Get latest changes via ZIP code"] =
@@ -33,7 +33,7 @@ class CastorusBridge extends BridgeAbstract {
}
// Extracts the tile from an actitiy
- function ExtractActivityTitle($activity){
+ private function ExtractActivityTitle($activity){
$title = $activity->find('a', 0);
if(!$title)
@@ -43,7 +43,7 @@ class CastorusBridge extends BridgeAbstract {
}
// Extracts the url from an actitiy
- function ExtractActivityUrl($activity){
+ private function ExtractActivityUrl($activity){
$url = $activity->find('a', 0);
if(!$url)
@@ -53,7 +53,7 @@ class CastorusBridge extends BridgeAbstract {
}
// Extracts the time from an activity
- function ExtractActivityTime($activity){
+ private function ExtractActivityTime($activity){
// Unfortunately the time is part of the parent node,
// so we have to clear all child nodes first
$nodes = $activity->find('*');
@@ -69,7 +69,7 @@ class CastorusBridge extends BridgeAbstract {
}
// Extracts the price change
- function ExtractActivityPrice($activity){
+ private function ExtractActivityPrice($activity){
$price = $activity->find('span', 1);
if(!$price)
diff --git a/bridges/CommonDreamsBridge.php b/bridges/CommonDreamsBridge.php
index cf4b589..54cf526 100644
--- a/bridges/CommonDreamsBridge.php
+++ b/bridges/CommonDreamsBridge.php
@@ -6,10 +6,10 @@ class CommonDreamsBridge extends BridgeAbstract{
$this->name = "CommonDreams Bridge";
$this->uri = "http://www.commondreams.org/";
$this->description = "Returns the newest articles.";
- $this->update = "2016-08-02";
+ $this->update = "2016-08-06";
}
- function CommonDreamsExtractContent($url) {
+ private function CommonDreamsExtractContent($url) {
$html3 = $this->file_get_html($url);
$text = $html3->find('div[class=field--type-text-with-summary]', 0)->innertext;
$html3->clear();
@@ -47,8 +47,4 @@ class CommonDreamsBridge extends BridgeAbstract{
public function getURI(){
return 'http://www.commondreams.org/';
}
-
- public function getCacheDuration(){
- return 3600; // 1 hours
- }
}
diff --git a/bridges/CopieDoubleBridge.php b/bridges/CopieDoubleBridge.php
index 2030979..d629976 100644
--- a/bridges/CopieDoubleBridge.php
+++ b/bridges/CopieDoubleBridge.php
@@ -7,7 +7,7 @@ class CopieDoubleBridge extends BridgeAbstract{
$this->name = "CopieDouble";
$this->uri = "http://www.copie-double.com/";
$this->description = "CopieDouble";
- $this->update = "12/12/2013";
+ $this->update = "2016-08-06";
}
@@ -50,13 +50,7 @@ class CopieDoubleBridge extends BridgeAbstract{
return 'http://www.copie-double.com';
}
- public function getDescription(){
- return 'CopieDouble via rss-bridge';
- }
-
public function getCacheDuration(){
return 14400; // 4 hours
}
}
-
-?>
diff --git a/bridges/CpasbienBridge.php b/bridges/CpasbienBridge.php
index 1f67cf3..93649e6 100644
--- a/bridges/CpasbienBridge.php
+++ b/bridges/CpasbienBridge.php
@@ -24,7 +24,7 @@ class CpasbienBridge extends HttpCachingBridgeAbstract{
$this->name = "Cpasbien Bridge";
$this->uri = "http://www.cpasbien.io";
$this->description = "Returns latest torrents from a request query";
- $this->update = "2016-01-26";
+ $this->update = "2016-08-06";
$this->parameters[] =
'[
@@ -83,10 +83,6 @@ class CpasbienBridge extends HttpCachingBridgeAbstract{
return (!empty($this->request) ? $this->request .' - ' : '') . $this->name;
}
- public function getURI(){
- return $this->uri;
- }
-
public function getCacheDuration(){
return 60*60*24; // 24 hours
}
diff --git a/bridges/DauphineLibereBridge.php b/bridges/DauphineLibereBridge.php
index d2fd1d1..24477a7 100644
--- a/bridges/DauphineLibereBridge.php
+++ b/bridges/DauphineLibereBridge.php
@@ -7,7 +7,7 @@ class DauphineLibereBridge extends BridgeAbstract {
$this->name = "DauphineLibereBridge Bridge";
$this->uri = "http://www.ledauphine.com/";
$this->description = "Returns the newest articles.";
- $this->update = "2016-08-02";
+ $this->update = "2016-08-06";
$this->parameters[] =
'[
@@ -81,7 +81,7 @@ class DauphineLibereBridge extends BridgeAbstract {
]';
}
- function ExtractContent($url, $context) {
+ private function ExtractContent($url, $context) {
$html2 = $this->file_get_html($url, false, $context);
$text = $html2->find('div.column', 0)->innertext;
$text = preg_replace('@@si', '', $text);
diff --git a/bridges/DeveloppezDotComBridge.php b/bridges/DeveloppezDotComBridge.php
index 51dc013..66a9b2b 100644
--- a/bridges/DeveloppezDotComBridge.php
+++ b/bridges/DeveloppezDotComBridge.php
@@ -6,10 +6,10 @@ class DeveloppezDotComBridge extends BridgeAbstract{
$this->name = "Developpez.com Actus (FR)";
$this->uri = "http://www.developpez.com/";
$this->description = "Returns the 15 newest posts from DeveloppezDotCom (full text).";
- $this->update = "2016-08-03";
+ $this->update = "2016-08-06";
}
- function DeveloppezDotComStripCDATA($string) {
+ private function DeveloppezDotComStripCDATA($string) {
$string = str_replace('', '', $string);
return $string;
@@ -17,7 +17,7 @@ class DeveloppezDotComBridge extends BridgeAbstract{
// F***ing quotes from Microsoft Word badly encoded, here was the trick:
// http://stackoverflow.com/questions/1262038/how-to-replace-microsoft-encoded-quotes-in-php
- function convert_smart_quotes($string)
+ private function convert_smart_quotes($string)
{
$search = array(chr(145),
chr(146),
@@ -34,7 +34,7 @@ class DeveloppezDotComBridge extends BridgeAbstract{
return str_replace($search, $replace, $string);
}
- function DeveloppezDotComExtractContent($url) {
+ private function DeveloppezDotComExtractContent($url) {
$articleHTMLContent = $this->file_get_html($url);
$text = $this->convert_smart_quotes($articleHTMLContent->find('div.content', 0)->innertext);
$text = utf8_encode($text);
diff --git a/bridges/DilbertBridge.php b/bridges/DilbertBridge.php
index 3826028..e4f2c9c 100644
--- a/bridges/DilbertBridge.php
+++ b/bridges/DilbertBridge.php
@@ -4,10 +4,10 @@ class DilbertBridge extends BridgeAbstract {
public function loadMetadatas() {
$this->maintainer = 'kranack';
- $this->name = $this->getName();
- $this->uri = $this->getURI();
- $this->description = $this->getDescription();
- $this->update = "14/05/2016";
+ $this->name = 'Dilbert Daily Strip';
+ $this->uri = 'http://dilbert.com';
+ $this->description = 'The Unofficial Dilbert Daily Comic Strip';
+ $this->update = "2016-08-06";
}
@@ -38,18 +38,6 @@ class DilbertBridge extends BridgeAbstract {
}
}
- public function getName() {
- return 'Dilbert Daily Strip';
- }
-
- public function getURI() {
- return 'http://dilbert.com';
- }
-
- public function getDescription() {
- return 'The Unofficial Dilbert Daily Comic Strip';
- }
-
public function getCacheDuration() {
return 21600; // 6 hours
}
diff --git a/bridges/EZTVBridge.php b/bridges/EZTVBridge.php
index 6266977..c171aee 100644
--- a/bridges/EZTVBridge.php
+++ b/bridges/EZTVBridge.php
@@ -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
- }
}
diff --git a/bridges/ElsevierBridge.php b/bridges/ElsevierBridge.php
index 4f4cd57..bd35925 100644
--- a/bridges/ElsevierBridge.php
+++ b/bridges/ElsevierBridge.php
@@ -6,7 +6,7 @@ class ElsevierBridge extends BridgeAbstract{
$this->name = 'Elsevier journals recent articles';
$this->uri = 'http://www.journals.elsevier.com';
$this->description = 'Returns the recent articles published in Elsevier journals';
- $this->update = '2016-08-02';
+ $this->update = '2016-08-06';
$this->parameters[] =
'[
@@ -21,7 +21,7 @@ class ElsevierBridge extends BridgeAbstract{
}
// Extracts the list of names from an article as string
- function ExtractArticleName ($article){
+ private function ExtractArticleName ($article){
$names = $article->find('small', 0);
if($names)
return trim($names->plaintext);
@@ -29,7 +29,7 @@ class ElsevierBridge extends BridgeAbstract{
}
// Extracts the timestamp from an article
- function ExtractArticleTimestamp ($article){
+ private function ExtractArticleTimestamp ($article){
$time = $article->find('.article-info', 0);
if($time){
$timestring = trim($time->plaintext);
@@ -53,7 +53,7 @@ class ElsevierBridge extends BridgeAbstract{
}
// Extracts the content from an article
- function ExtractArticleContent ($article){
+ private function ExtractArticleContent ($article){
$content = $article->find('.article-content', 0);
if($content){
return trim($content->plaintext);
diff --git a/bridges/EstCeQuonMetEnProdBridge.php b/bridges/EstCeQuonMetEnProdBridge.php
index 7d3e652..5e5d8b4 100644
--- a/bridges/EstCeQuonMetEnProdBridge.php
+++ b/bridges/EstCeQuonMetEnProdBridge.php
@@ -3,10 +3,10 @@ class EstCeQuonMetEnProdBridge extends BridgeAbstract {
public function loadMetadatas() {
$this->maintainer = 'ORelio';
- $this->name = $this->getName();
- $this->uri = $this->getURI();
- $this->description = $this->getDescription();
- $this->update = "02/07/2016";
+ $this->name = 'Est-ce qu\'on met en prod aujourd\'hui ?';
+ $this->uri = 'https://www.estcequonmetenprodaujourdhui.info/';
+ $this->description = 'Should we put a website in production today? (French)';
+ $this->update = "2016-08-06";
}
public function collectData(array $param) {
@@ -37,18 +37,6 @@ class EstCeQuonMetEnProdBridge extends BridgeAbstract {
$this->items[] = $item;
}
- public function getName() {
- return 'Est-ce qu\'on met en prod aujourd\'hui ?';
- }
-
- public function getURI() {
- return 'https://www.estcequonmetenprodaujourdhui.info/';
- }
-
- public function getDescription() {
- return 'Should we put a website in production today? (French)';
- }
-
public function getCacheDuration() {
return 21600; // 6 hours
}
diff --git a/bridges/FacebookBridge.php b/bridges/FacebookBridge.php
index 103494f..f1c9406 100644
--- a/bridges/FacebookBridge.php
+++ b/bridges/FacebookBridge.php
@@ -7,7 +7,7 @@ class FacebookBridge extends BridgeAbstract{
$this->name = "Facebook";
$this->uri = "http://www.facebook.com/";
$this->description = "Input a page title or a profile log. For a profile log, please insert the parameter as follow : myExamplePage/132621766841117";
- $this->update = "31/03/2016";
+ $this->update = "2016-08-06";
$this->parameters[] =
'[
@@ -226,10 +226,6 @@ class FacebookBridge extends BridgeAbstract{
return (isset($this->name) ? $this->name.' - ' : '').'Facebook Bridge';
}
- public function getURI() {
- return 'http://facebook.com';
- }
-
public function getCacheDuration() {
return 300; // 5 minutes
}
diff --git a/bridges/FootitoBridge.php b/bridges/FootitoBridge.php
index bc16d43..a66dd82 100644
--- a/bridges/FootitoBridge.php
+++ b/bridges/FootitoBridge.php
@@ -7,7 +7,7 @@ class FootitoBridge extends BridgeAbstract{
$this->name = "Footito";
$this->uri = "http://www.footito.fr/";
$this->description = "Footito";
- $this->update = "21/11/2013";
+ $this->update = "2016-08-06";
}
@@ -49,12 +49,4 @@ class FootitoBridge extends BridgeAbstract{
public function getURI(){
return 'http://www.footito.fr/';
}
-
- public function getCacheDuration(){
- return 3600; // 1h hours
- }
- public function getDescription(){
- return "Footito via rss-bridge";
- }
}
-?>
diff --git a/bridges/FuturaSciencesBridge.php b/bridges/FuturaSciencesBridge.php
index f8d0398..f22c610 100644
--- a/bridges/FuturaSciencesBridge.php
+++ b/bridges/FuturaSciencesBridge.php
@@ -4,10 +4,10 @@ class FuturaSciencesBridge extends BridgeAbstract {
public function loadMetadatas() {
$this->maintainer = 'ORelio';
- $this->name = $this->getName();
- $this->uri = $this->getURI();
+ $this->name = 'Futura-Sciences Bridge';
+ $this->uri = 'http://www.futura-sciences.com/';
$this->description = 'Returns the newest articles.';
- $this->update = '2016-08-03';
+ $this->update = '2016-08-06';
$this->parameters[] =
'[
@@ -218,16 +218,4 @@ class FuturaSciencesBridge extends BridgeAbstract {
}
}
-
- public function getName() {
- return 'Futura-Sciences Bridge';
- }
-
- public function getURI() {
- return 'http://www.futura-sciences.com/';
- }
-
- public function getCacheDuration() {
- return 3600;
- }
}
diff --git a/bridges/GBAtempBridge.php b/bridges/GBAtempBridge.php
index 69c5d09..75217b0 100644
--- a/bridges/GBAtempBridge.php
+++ b/bridges/GBAtempBridge.php
@@ -9,7 +9,7 @@ class GBAtempBridge extends BridgeAbstract {
$this->name = 'GBAtemp';
$this->uri = $this->getURI();
$this->description = 'GBAtemp is a user friendly underground video game community.';
- $this->update = '2016-08-02';
+ $this->update = '2016-08-06';
$this->parameters[] =
'[
@@ -40,7 +40,7 @@ class GBAtempBridge extends BridgeAbstract {
]';
}
- function ExtractFromDelimiters($string, $start, $end) {
+ private function ExtractFromDelimiters($string, $start, $end) {
if (strpos($string, $start) !== false) {
$section_retrieved = substr($string, strpos($string, $start) + strlen($start));
$section_retrieved = substr($section_retrieved, 0, strpos($section_retrieved, $end));
@@ -48,7 +48,7 @@ class GBAtempBridge extends BridgeAbstract {
} return false;
}
- function StripWithDelimiters($string, $start, $end) {
+ private function StripWithDelimiters($string, $start, $end) {
while (strpos($string, $start) !== false) {
$section_to_remove = substr($string, strpos($string, $start));
$section_to_remove = substr($section_to_remove, 0, strpos($section_to_remove, $end) + strlen($end));
@@ -56,7 +56,7 @@ class GBAtempBridge extends BridgeAbstract {
} return $string;
}
- function build_item($uri, $title, $author, $timestamp, $thumnail, $content) {
+ private function build_item($uri, $title, $author, $timestamp, $thumnail, $content) {
$item = new \Item();
$item->uri = $uri;
$item->title = $title;
@@ -67,14 +67,14 @@ class GBAtempBridge extends BridgeAbstract {
return $item;
}
- function cleanup_post_content($content, $site_url) {
+ private function cleanup_post_content($content, $site_url) {
$content = str_replace(':arrow:', '➤', $content);
$content = str_replace('href="attachments/', 'href="'.$site_url.'attachments/', $content);
$content = $this->StripWithDelimiters($content, '