diff --git a/bridges/SymfonyCastsBridge.php b/bridges/SymfonyCastsBridge.php new file mode 100644 index 00000000..acad9041 --- /dev/null +++ b/bridges/SymfonyCastsBridge.php @@ -0,0 +1,34 @@ +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'); + + $item = array(); // Create an empty item + $item['uid'] = $id; + $item['title'] = $title->innertext; + $item['timestamp'] = $dateString->innertext; + $item['content'] = $type->plaintext . '' . $title . ''; + $item['uri'] = $url; + $this->items[] = $item; // Add item to the list + } + + } +}