libretime/legacy/application/services/CeleryServiceFactory.php

23 lines
555 B
PHP
Raw Permalink Normal View History

<?php
2021-10-11 16:10:47 +02:00
class CeleryServiceFactory
{
/**
2021-10-11 16:10:47 +02:00
* Given an identifying string, get a ThirdPartyCeleryService object of that type.
*
* @param $serviceName string the name of the service to create
*
2021-10-11 16:10:47 +02:00
* @return null|Application_Service_ThirdPartyCeleryService
*/
2021-10-11 16:10:47 +02:00
public static function getService($serviceName)
{
switch ($serviceName) {
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
default:
return null;
}
}
2021-10-11 16:10:47 +02:00
}