DemoBridge.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. class DemoBridge extends BridgeAbstract{
  3. public function loadMetadatas() {
  4. $this->maintainer = "teromene";
  5. $this->name = "DemoBridge";
  6. $this->uri = "http://github.com/sebsauvage/rss-bridge";
  7. $this->description = "Bridge used for demos";
  8. $this->parameters['testCheckbox'] = array(
  9. 'testCheckbox'=>array(
  10. 'type'=>'checkbox',
  11. 'name'=>'test des checkbox'
  12. )
  13. );
  14. $this->parameters['testList'] = array(
  15. 'testList'=>array(
  16. 'type'=>'list',
  17. 'name'=>'test des listes',
  18. 'values'=>array(
  19. 'Test'=>'test',
  20. 'Test 2'=>'test2'
  21. )
  22. )
  23. );
  24. $this->parameters['testNumber'] = array(
  25. 'testNumber'=>array(
  26. 'type'=>'number',
  27. 'name'=>'test des numéros',
  28. 'exampleValue'=>'1515632'
  29. )
  30. );
  31. }
  32. public function collectData(array $param){
  33. $item = array();
  34. $item['author'] = "Me!";
  35. $item['title'] = "Test";
  36. $item['content'] = "Awesome content !";
  37. $item['id'] = "Lalala";
  38. $item['uri'] = "http://test.test/test";
  39. $this->items[] = $item;
  40. }
  41. public function getCacheDuration(){
  42. return 00; // 1 hour
  43. }
  44. }