rss-bridge/bridges/DemoBridge.php
Dag 6254b8593e
refactor(cache): extract and encapsulate cache expiration logic (#3547)
* refactor(cache): extract and encapsulate cache expiration logic

* fix: logic bug in getSimpleHTMLDOMCached

* fix: silly me, index should of course be on the key column

* silly me again, PRIMARY keys get index by default lol

* comment out the delete portion in loadData

* remove a few log statements

* tweak twitter cache timeout
2023-07-19 05:05:49 +02:00

48 lines
1.2 KiB
PHP

<?php
class DemoBridge extends BridgeAbstract
{
const MAINTAINER = 'teromene';
const NAME = 'DemoBridge';
const URI = 'http://github.com/rss-bridge/rss-bridge';
const DESCRIPTION = 'Bridge used for demos';
const CACHE_TIMEOUT = 15;
const PARAMETERS = [
'testCheckbox' => [
'testCheckbox' => [
'type' => 'checkbox',
'name' => 'test des checkbox'
]
],
'testList' => [
'testList' => [
'type' => 'list',
'name' => 'test des listes',
'values' => [
'Test' => 'test',
'Test 2' => 'test2'
]
]
],
'testNumber' => [
'testNumber' => [
'type' => 'number',
'name' => 'test des numéros',
'exampleValue' => '1515632'
]
]
];
public function collectData()
{
$item = [];
$item['author'] = 'Me!';
$item['title'] = 'Test';
$item['content'] = 'Awesome content !';
$item['id'] = 'Lalala';
$item['uri'] = 'http://example.com/test';
$this->items[] = $item;
}
}