aboutsummaryrefslogtreecommitdiff
path: root/bridges/JohannesBlickBridge.php
blob: 90cd4ef47f80c71439a6a118005fc47ff09db416 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php

class JohannesBlickBridge extends BridgeAbstract
{
    const NAME        = 'Johannes Blick';
    const URI         = 'https://www.st-johannes-baptist.de/index.php/medien-und-downloads/archiv-johannesblick';
    const DESCRIPTION = 'RSS feed for Johannes Blick';
    const MAINTAINER  = 'jummo4@yahoo.de';

    public function collectData()
    {
        $html = getSimpleHTMLDOM(self::URI);

        $html = defaultLinkTo($html, self::URI);
        foreach ($html->find('ul[class=easyfolderlisting] > li > a') as $index => $a) {
            $item = []; // Create an empty item
            $articlePath = $a->href;
            $item['title'] = $a->innertext;
            $item['uri'] = $articlePath;
            $item['content'] = '';

            $this->items[] = $item; // Add item to the list
            if (count($this->items) >= 10) {
                break;
            }
        }
    }
}