mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-01 14:20:16 +02:00
[core] Rename item getter/setter
getDatas -> getItems setDatas -> setItems Note: Bridge->setDatas actually sets data, where Bridge->getItems only returns items (this is why Bridge->setDatas was not changed)
This commit is contained in:
@@ -19,7 +19,7 @@ class AtomFormat extends FormatAbstract{
|
||||
$uri = $this->xml_encode($uri);
|
||||
|
||||
$entries = '';
|
||||
foreach($this->getDatas() as $data){
|
||||
foreach($this->getItems() as $data){
|
||||
$entryAuthor = isset($data['author']) ? $this->xml_encode($data['author']) : '';
|
||||
$entryTitle = isset($data['title']) ? $this->xml_encode($data['title']) : '';
|
||||
$entryUri = isset($data['uri']) ? $this->xml_encode($data['uri']) : '';
|
||||
|
@@ -9,7 +9,7 @@ class HtmlFormat extends FormatAbstract{
|
||||
$mrssquery = str_replace('format=Html', 'format=Mrss', htmlentities($_SERVER['QUERY_STRING']));
|
||||
|
||||
$entries = '';
|
||||
foreach($this->getDatas() as $data){
|
||||
foreach($this->getItems() as $data){
|
||||
$entryAuthor = isset($data['author']) ? '<br /><p class="author">by: ' . $data['author'] . '</p>' : '';
|
||||
$entryTitle = isset($data['title']) ? $this->sanitizeHtml(strip_tags($data['title'])) : '';
|
||||
$entryUri = isset($data['uri']) ? $data['uri'] : $uri;
|
||||
|
@@ -7,7 +7,7 @@ class JsonFormat extends FormatAbstract{
|
||||
|
||||
public function stringify(){
|
||||
// FIXME : sometime content can be null, transform to empty string
|
||||
$datas = $this->getDatas();
|
||||
$datas = $this->getItems();
|
||||
|
||||
return json_encode($datas, JSON_PRETTY_PRINT);
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ class MrssFormat extends FormatAbstract{
|
||||
$uri = $this->xml_encode(!empty($extraInfos['uri']) ? $extraInfos['uri'] : 'https://github.com/sebsauvage/rss-bridge');
|
||||
|
||||
$items = '';
|
||||
foreach($this->getDatas() as $data){
|
||||
foreach($this->getItems() as $data){
|
||||
$itemAuthor = isset($data['author']) ? $this->xml_encode($data['author']) : '';
|
||||
$itemTitle = strip_tags(isset($data['title']) ? $this->xml_encode($data['title']) : '');
|
||||
$itemUri = isset($data['uri']) ? $this->xml_encode($data['uri']) : '';
|
||||
|
@@ -6,7 +6,7 @@
|
||||
class PlaintextFormat extends FormatAbstract{
|
||||
|
||||
public function stringify(){
|
||||
$datas = $this->getDatas();
|
||||
$datas = $this->getItems();
|
||||
return print_r($datas, true);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user