mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-19 13:01:19 +00:00
29 lines
733 B
PHP
29 lines
733 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Modules\PremiumPodcasts\Config;
|
|
|
|
use CodeIgniter\Config\BaseService;
|
|
use Modules\PremiumPodcasts\Models\SubscriptionModel;
|
|
use Modules\PremiumPodcasts\PremiumPodcasts;
|
|
|
|
class Services extends BaseService
|
|
{
|
|
public static function premium_podcasts(
|
|
?SubscriptionModel $subscriptionModel = null,
|
|
bool $getShared = true,
|
|
): PremiumPodcasts {
|
|
if ($getShared) {
|
|
return self::getSharedInstance('premium_podcasts', $subscriptionModel);
|
|
}
|
|
|
|
$premiumPodcasts = new PremiumPodcasts();
|
|
|
|
$subscriptionModel ??= model('SubscriptionModel');
|
|
|
|
return $premiumPodcasts
|
|
->setSubscriptionModel($subscriptionModel);
|
|
}
|
|
}
|