<?php

namespace common\logic\Subscription\ProductSubscription\Module;

use common\logic\AbstractModule;
use common\logic\Subscription\ProductSubscription\Repository\ProductSubscriptionRepository;
use common\logic\Subscription\ProductSubscription\Service\ProductSubscriptionBuilder;
use common\logic\Subscription\ProductSubscription\Service\ProductSubscriptionDefinition;

/**
 * @mixin ProductSubscriptionDefinition
 * @mixin ProductSubscriptionRepository
 * @mixin ProductSubscriptionBuilder
 */
class ProductSubscriptionModule extends AbstractModule
{
    public function getServices(): array
    {
        return [
            ProductSubscriptionDefinition::class,
            ProductSubscriptionRepository::class,
            ProductSubscriptionBuilder::class
        ];
    }

    public function getDefinition(): ProductSubscriptionDefinition
    {
        return ProductSubscriptionDefinition::getInstance();
    }

    public function getRepository(): ProductSubscriptionRepository
    {
        return ProductSubscriptionRepository::getInstance();
    }

    public function getFactory(): ProductSubscriptionBuilder
    {
        return ProductSubscriptionBuilder::getInstance();
    }
}