aboutsummaryrefslogtreecommitdiff
path: root/bridges/TebeoBridge.php
diff options
context:
space:
mode:
authorGravatar Dag <me@dvikan.no> 2022-07-01 15:10:30 +0200
committerGravatar GitHub <noreply@github.com> 2022-07-01 15:10:30 +0200
commit4f75591060d95208a301bc6bf460d875631b29cc (patch)
tree4e37d86840e8d990a563ba75d3de6f84a53cc2de /bridges/TebeoBridge.php
parent66568e3a39c61546c09a47a5688914a0bdf3c60c (diff)
downloadrss-bridge-4f75591060d95208a301bc6bf460d875631b29cc.tar.gz
rss-bridge-4f75591060d95208a301bc6bf460d875631b29cc.tar.zst
rss-bridge-4f75591060d95208a301bc6bf460d875631b29cc.zip
Reformat codebase v4 (#2872)
Reformat code base to PSR12 Co-authored-by: rssbridge <noreply@github.com>
Diffstat (limited to 'bridges/TebeoBridge.php')
-rw-r--r--bridges/TebeoBridge.php74
1 files changed, 39 insertions, 35 deletions
diff --git a/bridges/TebeoBridge.php b/bridges/TebeoBridge.php
index ba44d0e2..aef303c4 100644
--- a/bridges/TebeoBridge.php
+++ b/bridges/TebeoBridge.php
@@ -1,41 +1,45 @@
<?php
-class TebeoBridge extends FeedExpander {
- const NAME = 'Tébéo Bridge';
- const URI = 'http://www.tebeo.bzh/';
- const CACHE_TIMEOUT = 21600; //6h
- const DESCRIPTION = 'Returns the newest Tébéo videos by category';
- const MAINTAINER = 'Mitsukarenai';
- const PARAMETERS = array( array(
- 'cat' => array(
- 'name' => 'Catégorie',
- 'type' => 'list',
- 'values' => array(
- 'Toutes les vidéos' => '/',
- 'Actualité' => '/14-actualite',
- 'Sport' => '/3-sport',
- 'Culture-Loisirs' => '/5-culture-loisirs',
- 'Société' => '/15-societe',
- 'Langue Bretonne' => '/9-langue-bretonne'
- )
- )
- ));
+class TebeoBridge extends FeedExpander
+{
+ const NAME = 'Tébéo Bridge';
+ const URI = 'http://www.tebeo.bzh/';
+ const CACHE_TIMEOUT = 21600; //6h
+ const DESCRIPTION = 'Returns the newest Tébéo videos by category';
+ const MAINTAINER = 'Mitsukarenai';
- public function getIcon() {
- return self::URI . 'images/header_logo.png';
- }
+ const PARAMETERS = [ [
+ 'cat' => [
+ 'name' => 'Catégorie',
+ 'type' => 'list',
+ 'values' => [
+ 'Toutes les vidéos' => '/',
+ 'Actualité' => '/14-actualite',
+ 'Sport' => '/3-sport',
+ 'Culture-Loisirs' => '/5-culture-loisirs',
+ 'Société' => '/15-societe',
+ 'Langue Bretonne' => '/9-langue-bretonne'
+ ]
+ ]
+ ]];
- public function collectData(){
- $url = self::URI . '/le-replay/' . $this->getInput('cat');
- $html = getSimpleHTMLDOM($url);
+ public function getIcon()
+ {
+ return self::URI . 'images/header_logo.png';
+ }
- foreach($html->find('div[id=items_replay] div.replay') as $element) {
- $item = array();
- $item['uri'] = $element->find('a', 0)->href;
- $item['title'] = $element->find('h3', 0)->plaintext;
- $item['timestamp'] = strtotime($element->find('p.moment-format-day', 0)->plaintext);
- $item['content'] = '<a href="' . $item['uri'] . '"><img alt="" src="' . $element->find('img', 0)->src . '"></a>';
- $this->items[] = $item;
- }
- }
+ public function collectData()
+ {
+ $url = self::URI . '/le-replay/' . $this->getInput('cat');
+ $html = getSimpleHTMLDOM($url);
+
+ foreach ($html->find('div[id=items_replay] div.replay') as $element) {
+ $item = [];
+ $item['uri'] = $element->find('a', 0)->href;
+ $item['title'] = $element->find('h3', 0)->plaintext;
+ $item['timestamp'] = strtotime($element->find('p.moment-format-day', 0)->plaintext);
+ $item['content'] = '<a href="' . $item['uri'] . '"><img alt="" src="' . $element->find('img', 0)->src . '"></a>';
+ $this->items[] = $item;
+ }
+ }
}