/** * Wrapper method that uses FeedReader * class to generate XML and then * generates an array of top track info. */ function readInData() { $feedReader = new FeedReader($this->url); $data = $feedReader->readInXML(); $topEntries = array(); foreach ($data->entry as $entry) { $trackInfo = array(); $trackTitleInfo = explode("-", $entry->title); $trackInfo['title'] = $trackTitleInfo[0]; $trackInfo['artist'] = $trackTitleInfo[1]; $trackInfo['link'] = (string) $entry->id; $topEntries[] = $trackInfo; } $this->setTopEntries($topEntries); }