aboutsummaryrefslogtreecommitdiff
path: root/bridges/SymfonyCastsBridge.php
diff options
context:
space:
mode:
Diffstat (limited to 'bridges/SymfonyCastsBridge.php')
-rw-r--r--bridges/SymfonyCastsBridge.php55
1 files changed, 28 insertions, 27 deletions
diff --git a/bridges/SymfonyCastsBridge.php b/bridges/SymfonyCastsBridge.php
index 63b908ce..29ba87cd 100644
--- a/bridges/SymfonyCastsBridge.php
+++ b/bridges/SymfonyCastsBridge.php
@@ -1,33 +1,34 @@
<?php
-class SymfonyCastsBridge extends BridgeAbstract {
- const NAME = 'SymfonyCasts Bridge';
- const URI = 'https://symfonycasts.com/';
- const DESCRIPTION = 'Follow new updates on symfonycasts.com';
- const MAINTAINER = 'Park0';
- const CACHE_TIMEOUT = 3600;
+class SymfonyCastsBridge extends BridgeAbstract
+{
+ const NAME = 'SymfonyCasts Bridge';
+ const URI = 'https://symfonycasts.com/';
+ const DESCRIPTION = 'Follow new updates on symfonycasts.com';
+ const MAINTAINER = 'Park0';
+ const CACHE_TIMEOUT = 3600;
- public function collectData() {
- $html = getSimpleHTMLDOM('https://symfonycasts.com/updates/find');
- $dives = $html->find('div');
+ public function collectData()
+ {
+ $html = getSimpleHTMLDOM('https://symfonycasts.com/updates/find');
+ $dives = $html->find('div');
- /* @var simple_html_dom $div */
- foreach ($dives as $div) {
- $id = $div->getAttribute('data-mark-update-id-value');
- $type = $div->find('h5', 0);
- $title = $div->find('span', 0);
- $dateString = $div->find('h5.font-gray', 0);
- $href = $div->find('a', 0);
- $url = 'https://symfonycasts.com' . $href->getAttribute('href');
+ /* @var simple_html_dom $div */
+ foreach ($dives as $div) {
+ $id = $div->getAttribute('data-mark-update-id-value');
+ $type = $div->find('h5', 0);
+ $title = $div->find('span', 0);
+ $dateString = $div->find('h5.font-gray', 0);
+ $href = $div->find('a', 0);
+ $url = 'https://symfonycasts.com' . $href->getAttribute('href');
- $item = array(); // Create an empty item
- $item['uid'] = $id;
- $item['title'] = $title->innertext;
- $item['timestamp'] = $dateString->innertext;
- $item['content'] = $type->plaintext . '<a href="' . $url . '">' . $title . '</a>';
- $item['uri'] = $url;
- $this->items[] = $item; // Add item to the list
- }
-
- }
+ $item = []; // Create an empty item
+ $item['uid'] = $id;
+ $item['title'] = $title->innertext;
+ $item['timestamp'] = $dateString->innertext;
+ $item['content'] = $type->plaintext . '<a href="' . $url . '">' . $title . '</a>';
+ $item['uri'] = $url;
+ $this->items[] = $item; // Add item to the list
+ }
+ }
}