aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/05_Bridge_API/02_BridgeAbstract.md49
-rw-r--r--docs/05_Bridge_API/03_FeedExpander.md5
-rw-r--r--docs/05_Bridge_API/index.md6
-rw-r--r--docs/07_Cache_API/index.md8
-rw-r--r--docs/09_Technical_recommendations/index.md2
5 files changed, 40 insertions, 30 deletions
diff --git a/docs/05_Bridge_API/02_BridgeAbstract.md b/docs/05_Bridge_API/02_BridgeAbstract.md
index 12d24bdc..a8e9db42 100644
--- a/docs/05_Bridge_API/02_BridgeAbstract.md
+++ b/docs/05_Bridge_API/02_BridgeAbstract.md
@@ -94,7 +94,7 @@ class MyBridge extends BridgeAbstract {
const MAINTAINER = 'ghost';
public function collectData() {
- $item = array(); // Create an empty item
+ $item = []; // Create an empty item
$item['title'] = 'Hello World!';
@@ -121,11 +121,11 @@ class MyBridge extends BridgeAbstract {
const URI = '';
const DESCRIPTION = 'No description provided';
const MAINTAINER = 'No maintainer';
- const PARAMETERS = array(); // Can be omitted!
+ const PARAMETERS = []; // Can be omitted!
const CACHE_TIMEOUT = 3600; // Can be omitted!
public function collectData() {
- $item = array(); // Create an empty item
+ $item = []; // Create an empty item
$item['title'] = 'Hello World!';
@@ -145,7 +145,7 @@ For information on how to read parameter values during execution, please refer t
## Adding parameters to a bridge
-Parameters are specified as part of the bridge class. An empty list of parameters is defined as `const PARAMETERS = array();`
+Parameters are specified as part of the bridge class. An empty list of parameters is defined as `const PARAMETERS = [];`
<details><summary>Show example</summary><div>
@@ -153,7 +153,7 @@ Parameters are specified as part of the bridge class. An empty list of parameter
<?PHP
class MyBridge extends BridgeAbstract {
/* ... */
- const PARAMETERS = array(); // Empty list of parameters (can be omitted)
+ const PARAMETERS = []; // Empty list of parameters (can be omitted)
/* ... */
}
```
@@ -172,10 +172,10 @@ A context is defined as a associative array of parameters. The name of a context
<details><summary>Show example</summary><div>
```PHP
-const PARAMETERS = array(
- 'My Context 1' => array(),
- 'My Context 2' => array()
-);
+const PARAMETERS = [
+ 'My Context 1' => [],
+ 'My Context 2' => [],
+];
```
**Output**
@@ -189,9 +189,9 @@ _Notice_: The name of a context can be left empty if only one context is needed!
<details><summary>Show example</summary><div>
```PHP
-const PARAMETERS = array(
- array()
-);
+const PARAMETERS = [
+ []
+];
```
</div></details><br>
@@ -201,25 +201,28 @@ You can also define a set of parameters that will be applied to every possible c
<details><summary>Show example</summary><div>
```PHP
-const PARAMETERS = array(
- 'global' => array() // Applies to all contexts!
-);
+const PARAMETERS = [
+ 'global' => [] // Applies to all contexts!
+];
```
</div></details>
## Level 2 - Parameter
-Parameters are placed inside a context. They are defined as associative array of parameter specifications. Each parameter is defined by it's internal input name, a definition in the form `'n' => array();`, where `n` is the name with which the bridge can access the parameter during execution.
+Parameters are placed inside a context.
+They are defined as associative array of parameter specifications.
+Each parameter is defined by it's internal input name, a definition in the form `'n' => [];`,
+where `n` is the name with which the bridge can access the parameter during execution.
<details><summary>Show example</summary><div>
```PHP
-const PARAMETERS = array(
- 'My Context' => array(
- 'n' => array()
- )
-);
+const PARAMETERS = [
+ 'My Context' => [
+ 'n' => []
+ ]
+];
```
</div></details><br>
@@ -351,7 +354,7 @@ Elements collected by this function must be stored in `$this->items`. The `items
```PHP
-$item = array(); // Create a new item
+$item = []; // Create a new item
$item['title'] = 'Hello World!';
@@ -448,7 +451,7 @@ public function detectParameters($url){
&& preg_match($regex, $url, $urlMatches) > 0
&& preg_match($regex, static::URI, $bridgeUriMatches) > 0
&& $urlMatches[3] === $bridgeUriMatches[3]) {
- return array();
+ return [];
} else {
return null;
}
diff --git a/docs/05_Bridge_API/03_FeedExpander.md b/docs/05_Bridge_API/03_FeedExpander.md
index 7e72670a..910d1abb 100644
--- a/docs/05_Bridge_API/03_FeedExpander.md
+++ b/docs/05_Bridge_API/03_FeedExpander.md
@@ -93,10 +93,11 @@ class MySiteBridge extends FeedExpander {
const NAME = 'Unnamed bridge';
const URI = '';
const DESCRIPTION = 'No description provided';
- const PARAMETERS = array();
+ const PARAMETERS = [];
const CACHE_TIMEOUT = 3600;
- public function collectData(){
+ public function collectData()
+ {
$this->collectExpandableDatas('your feed URI');
}
}
diff --git a/docs/05_Bridge_API/index.md b/docs/05_Bridge_API/index.md
index 6115fa01..e49e47be 100644
--- a/docs/05_Bridge_API/index.md
+++ b/docs/05_Bridge_API/index.md
@@ -1,4 +1,8 @@
-A _Bridge_ is an class that allows **RSS-Bridge** to create an RSS-feed from a website. A _Bridge_ represents one element on the [Welcome screen](../01_General/04_Screenshots.md) and covers one or more sites to return feeds for. It is developed in a PHP file located in the `bridges/` folder (see [Folder structure](../04_For_Developers/03_Folder_structure.md)) and extends one of the base classes of **RSS-Bridge**:
+A _Bridge_ is a class that allows **RSS-Bridge** to create an RSS-feed from a website.
+A _Bridge_ represents one element on the [Welcome screen](../01_General/04_Screenshots.md)
+and covers one or more sites to return feeds for.
+It is developed in a PHP file located in the `bridges/` folder (see [Folder structure](../04_For_Developers/03_Folder_structure.md))
+and extends one of the base classes of **RSS-Bridge**:
Base class | Description
-----------|------------
diff --git a/docs/07_Cache_API/index.md b/docs/07_Cache_API/index.md
index 57692847..17afbacc 100644
--- a/docs/07_Cache_API/index.md
+++ b/docs/07_Cache_API/index.md
@@ -1,4 +1,6 @@
-A _Cache_ is a class that allows **RSS-Bridge** to store fetched data in a local storage area on the server. Cache imlementations are placed in the `caches/` folder (see [Folder structure](../04_For_Developers/03_Folder_structure.md)). A cache must implement the [`CacheInterface`](../07_Cache_API/02_CacheInterface.md) interface.
-
-For more information about how to create a new `Cache`, read [How to create a new cache?](../07_Cache_API/01_How_to_create_a_new_cache.md)
+A _Cache_ is a class that allows **RSS-Bridge** to store fetched data in a local storage area on the server.
+Cache imlementations are placed in the `caches/` folder (see [Folder structure](../04_For_Developers/03_Folder_structure.md)).
+A cache must implement the [`CacheInterface`](../07_Cache_API/02_CacheInterface.md) interface.
+For more information about how to create a new `Cache`, read
+[How to create a new cache?](../07_Cache_API/01_How_to_create_a_new_cache.md)
diff --git a/docs/09_Technical_recommendations/index.md b/docs/09_Technical_recommendations/index.md
index f2b15476..a57f0bbd 100644
--- a/docs/09_Technical_recommendations/index.md
+++ b/docs/09_Technical_recommendations/index.md
@@ -15,7 +15,7 @@ class TestBridge extends BridgeAbstract {
const URI = '';
const DESCRIPTION = 'No description provided';
const MAINTAINER = 'No maintainer';
- const PARAMETERS = array();
+ const PARAMETERS = [];
const CACHE_TIMEOUT = 3600;
public function collectData(){