returnError('Could not request CollegeDeFrance.', 404); $limit = 0; foreach($html->find('li.audio') as $element) { if($limit < 10) { $item = new \Item(); $item->title = $element->find('span.title', 0)->plaintext; $item->timestamp = strtotime(str_replace($find, $replace, $element->find('span.date', 0)->plaintext)); $item->content = $element->find('span.lecturer', 0)->innertext . ' - ' . $element->find('span.title', 0)->innertext; $item->uri = $element->find('a', 0)->href; $this->items[] = $item; $limit++; } } } public function getName(){ return 'CollegeDeFrance'; } public function getURI(){ return 'http://www.college-de-france.fr/'; } public function getCacheDuration(){ return 3600*3; // 3 hour } }