title = $epData->title; $this->pubDate = $this->formatDate($epData->pubDate); $this->desc = preg_replace("/
.+<\/p>/", "", $epData->description); $this->audioData = $this->formatAudioData($epData->enclosure->attributes()); } function formatDate($date) { $fmt = new \IntlDateFormatter("fr_FR", null, null); $fmt->setPattern('d MMMM yyyy HH:mm'); $dateTimeCFF = \DateTime::createFromFormat( \DateTime::RFC7231, $date ); return $fmt->format($dateTimeCFF); } function formatAudioData($rawAudioData) { return "src={$rawAudioData->url}". " type={$rawAudioData->type}". " length={$rawAudioData->length}"; } function getFormatedAudioData() { return "src={$this->audioData["url"]} length={$this->audioData["length"]} type={$this->audioData["type"]}"; } } ?>