aboutsummaryrefslogtreecommitdiff
path: root/bridges/TheWhiteboardBridge.php
diff options
context:
space:
mode:
Diffstat (limited to 'bridges/TheWhiteboardBridge.php')
-rw-r--r--bridges/TheWhiteboardBridge.php33
1 files changed, 18 insertions, 15 deletions
diff --git a/bridges/TheWhiteboardBridge.php b/bridges/TheWhiteboardBridge.php
index e455d100..c36cc5f6 100644
--- a/bridges/TheWhiteboardBridge.php
+++ b/bridges/TheWhiteboardBridge.php
@@ -1,22 +1,25 @@
<?php
-class TheWhiteboardBridge extends BridgeAbstract {
- const NAME = 'The Whiteboard';
- const URI = 'https://www.the-whiteboard.com/';
- const DESCRIPTION = 'Get the latest comic from The Whiteboard';
- const MAINTAINER = 'CyberJacob';
- public function collectData() {
- $item = array();
+class TheWhiteboardBridge extends BridgeAbstract
+{
+ const NAME = 'The Whiteboard';
+ const URI = 'https://www.the-whiteboard.com/';
+ const DESCRIPTION = 'Get the latest comic from The Whiteboard';
+ const MAINTAINER = 'CyberJacob';
- $html = getSimpleHTMLDOM(self::URI);
+ public function collectData()
+ {
+ $item = [];
- $image = $html->find('center', 1)->find('img', 0);
- $image->src = self::URI . '/' . $image->src;
+ $html = getSimpleHTMLDOM(self::URI);
- $item['title'] = explode("\r\n", $html->find('center', 1)->plaintext)[0];
- $item['content'] = $image;
- $item['timestamp'] = explode("\r\n", $html->find('center', 1)->plaintext)[0];
+ $image = $html->find('center', 1)->find('img', 0);
+ $image->src = self::URI . '/' . $image->src;
- $this->items[] = $item;
- }
+ $item['title'] = explode("\r\n", $html->find('center', 1)->plaintext)[0];
+ $item['content'] = $image;
+ $item['timestamp'] = explode("\r\n", $html->find('center', 1)->plaintext)[0];
+
+ $this->items[] = $item;
+ }
}