diff --git a/BridgeAbstract.md b/BridgeAbstract.md index 314ff4c..13b566d 100644 --- a/BridgeAbstract.md +++ b/BridgeAbstract.md @@ -1,8 +1,7 @@ `BridgeAbstract` is a base class intended for standard Bridges that need to filter HTML pages for content. -To create a new Bridge extending `BridgeAbstract` you must implement following functions: +To create a new Bridge extending `BridgeAbstract` you must specify some [basic metadata](#basic-metadata) implement following functions: -- [`loadMetadatas`](#the-loadmetadatas-function) (**required**) - [`collectData`](#the-collectdata-function) (**required**) - [`getName`](#the-getname-function) - [`getURI`](#the-geturi-function) @@ -10,59 +9,54 @@ To create a new Bridge extending `BridgeAbstract` you must implement following f Find a [template](#template) at the end of this file. -## The `loadMetadatas` function - -This function is used by **RSS-Bridge** to determine the name, maintainer name, website, last updated date... of the bridge, and the user parameters. - -### Basic metadata +## Basic metadata The basic metadata are : ```PHP -$this->maintainer // Name of the maintainer -$this->name // Name of the bridge -$this->uri // URI to the target website of the bridge ("http://....") -$this->description // A brief description of the bridge -$this->parameters // (optional) Definition of additional parameters +const NAME // Name of the Bridge +const URI // URI to the target website of the bridge ("http://....") +const DESCRIPTION // A brief description of the Bridge +const MAINTAINER // Name of the maintainer +const PARAMETERS // (optional) Definition of additional parameters ``` -Find a description of `$this->parameters` [below](#parameters) +Find a description of `const PARAMETERS` [below](#parameters) The default values are : ```PHP -$this->maintainer = 'No maintainer'; -$this->name = "Unnamed bridge"; -$this->uri = ""; -$this->description = 'No description provided'; -$this->parameters = array(); +const NAME = "Unnamed bridge"; +const URI = ""; +const DESCRIPTION = 'No description provided'; +const MAINTAINER = 'No maintainer'; +const PARAMETERS = array(); ``` ### Parameters Parameters are defined in an array, which is used to generate an HTML `