# Howto create a bridge A bridge is an class that allows rss-bridge to create a RSS feed from a website. The bridge is a PHP file, located in the `bridges/` folder. Read the following chapters an make sure to read the [Guidelines](#guidelines)! ## Specifications A rss bridge must extend the `BridgeAbstract` class and implement the following functions : * [`loadMetadatas`](#the-loadmetadatas-function) * [`collectData`](#the-collectdata-function) * [`getName`](#the-getname-function) * [`getURI`](#the-geturi-function) * [`getCacheDuration`](#the-getcacheduration-function) 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 metadatas The basic metadatas 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->update // Date of last change in format "yyyy-mm-dd" $this->parameters // (optional) Definition of additional parameters ``` Find a description of `$this->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(); ``` ### Parameters Parameters are defined in a JSON-like format, which is parsed and transformed into a HTML `