mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-07-28 04:10:24 +02:00
Formats: Remove display & related method (#2776)
Format should not be responsible for sending HTTP response.
This commit is contained in:
@@ -14,14 +14,6 @@ Find a [template](#template) at the end of this file
|
||||
|
||||
# Functions
|
||||
|
||||
## The `display` function
|
||||
|
||||
The `display` function shows the contents to the user and must return the object instance.
|
||||
|
||||
```PHP
|
||||
display(): self
|
||||
```
|
||||
|
||||
## The `stringify` function
|
||||
|
||||
The `stringify` function returns the items received by [`setItems`](#the-setitem-function) as string.
|
||||
@@ -109,12 +101,6 @@ class MyTypeFormat implements FormatInterface {
|
||||
return ''; // Return items as string
|
||||
}
|
||||
|
||||
public function display(){
|
||||
// Implement your code here
|
||||
echo $this->stringify();
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setItems(array $items){
|
||||
$this->items = $items;
|
||||
return $this;
|
||||
|
Reference in New Issue
Block a user