sintonia/airtime_mvc/application/services/PodcastFactory.php
2015-10-19 11:54:53 -04:00

15 lines
No EOL
437 B
PHP

<?php
class PodcastFactory
{
public static function create($feedUrl)
{
// check if station podcast exists and if not, create one
$stationPodcastId = Application_Model_Preference::getStationPodcastId();
if (empty($stationPodcastId)) {
Application_Service_PodcastService::createStationPodcast();
}
return Application_Service_PodcastService::createFromFeedUrl($feedUrl);
}
}