sintonia/airtime_mvc/application/services/PublishServiceFactory.php
Duncan Sommerville 0b1df6baf3 * SAAS-1084 - initial work on publishing API backend
* More work on automatic ingest
* Add automatic_ingest_timestamp column to ImportedPodcast
2015-10-20 19:03:34 -04:00

23 lines
No EOL
623 B
PHP

<?php
class PublishServiceFactory {
/**
* Given an identifying string, get a PublishService object of that type
*
* @param $serviceName string the name of the service to create
*
* @return Publish|null
*/
public static function getService($serviceName) {
switch($serviceName) {
case SOUNDCLOUD_SERVICE_NAME:
return new Application_Service_SoundcloudService();
case STATION_PODCAST_SERVICE_NAME:
return new Application_Service_PodcastEpisodeService();
default:
return null;
}
}
}