2015-06-16 21:10:08 +02:00
|
|
|
<?php
|
|
|
|
|
2021-10-11 16:10:47 +02:00
|
|
|
class CeleryServiceFactory
|
|
|
|
{
|
2015-06-16 21:10:08 +02:00
|
|
|
/**
|
2021-10-11 16:10:47 +02:00
|
|
|
* Given an identifying string, get a ThirdPartyCeleryService object of that type.
|
2015-06-16 21:10:08 +02:00
|
|
|
*
|
|
|
|
* @param $serviceName string the name of the service to create
|
|
|
|
*
|
2021-10-11 16:10:47 +02:00
|
|
|
* @return null|Application_Service_ThirdPartyCeleryService
|
2015-06-16 21:10:08 +02:00
|
|
|
*/
|
2021-10-11 16:10:47 +02:00
|
|
|
public static function getService($serviceName)
|
|
|
|
{
|
|
|
|
switch ($serviceName) {
|
2015-09-23 02:22:06 +02:00
|
|
|
case PODCAST_SERVICE_NAME:
|
2015-10-13 16:14:23 +02:00
|
|
|
return new Application_Service_PodcastEpisodeService();
|
2021-10-11 16:10:47 +02:00
|
|
|
|
2015-09-23 02:22:06 +02:00
|
|
|
default:
|
|
|
|
return null;
|
2015-06-16 21:10:08 +02:00
|
|
|
}
|
|
|
|
}
|
2021-10-11 16:10:47 +02:00
|
|
|
}
|