mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-06 08:37:30 +02:00
[FormatInterface] Implement functions in the template
@@ -91,6 +91,10 @@ This is a bare minimum template for a format:
|
|||||||
```PHP
|
```PHP
|
||||||
<?php
|
<?php
|
||||||
class MyTypeFormat implements FormatInterface {
|
class MyTypeFormat implements FormatInterface {
|
||||||
|
private $items;
|
||||||
|
private $charset;
|
||||||
|
private $extraInfos;
|
||||||
|
|
||||||
public function stringify(){
|
public function stringify(){
|
||||||
// Implement your code here
|
// Implement your code here
|
||||||
return ''; // Return items as string
|
return ''; // Return items as string
|
||||||
@@ -103,33 +107,30 @@ class MyTypeFormat implements FormatInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function setItems(array $items){
|
public function setItems(array $items){
|
||||||
// Implement your code here!
|
$this->items = $items;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getItems(){
|
public function getItems(){
|
||||||
// Implement your code here!
|
return $this->items;
|
||||||
return array(); // Return original items
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setCharset($charset){
|
public function setCharset($charset){
|
||||||
// Implement your code here!
|
$this->charset = $charset;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCharset(){
|
public function getCharset(){
|
||||||
// Implement your code here!
|
return $this->charset;
|
||||||
return ''; // Return the charset!
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setExtraInfos(array $infos){
|
public function setExtraInfos(array $infos){
|
||||||
// Implement your code here!
|
$this->extraInfos = $infos;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getExtraInfos(){
|
public function getExtraInfos(){
|
||||||
// Implement your code here!
|
return $this->extraInfos;
|
||||||
return array(); // Return the original infos!
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Imaginary empty line!
|
// Imaginary empty line!
|
||||||
|
Reference in New Issue
Block a user