diff --git a/bridges/LaTeX3ProjectNewslettersBridge.php b/bridges/LaTeX3ProjectNewslettersBridge.php new file mode 100644 index 00000000..08e5fd85 --- /dev/null +++ b/bridges/LaTeX3ProjectNewslettersBridge.php @@ -0,0 +1,33 @@ +find('article tbody', 0); + + foreach($newsContainer->find('tr') as $row) { + $this->items[] = $this->collectArticle($row); + } + } + + private function collectArticle($element) { + $item = array(); + $item['uri'] = static::URI . $element->find('td', 1)->find('a', 0)->href; + $item['title'] = $element->find('td', 1)->find('a', 0)->plaintext; + $item['timestamp'] = DateTime::createFromFormat('Y/m/d', $element->find('td', 0)->plaintext)->getTimestamp(); + $item['content'] = $element->find('td', 2)->plaintext; + $item['author'] = 'LaTeX3 Project'; + return $item; + } + + public function getIcon(){ + return self::URI . '/favicon.ico'; + } +}