<?php

namespace common\logic\Product\Product\Module;

use common\logic\AbstractModule;
use common\logic\DefinitionInterface;
use common\logic\Product\Product\Repository\ProductRepository;
use common\logic\Product\Product\Service\ProductBuilder;
use common\logic\Product\Product\Service\ProductDefinition;
use common\logic\Product\Product\Service\ProductSolver;

/**
 * @mixin ProductDefinition
 * @mixin ProductSolver
 * @mixin ProductRepository
 * @mixin ProductBuilder
 */
class ProductModule extends AbstractModule
{
    public function getServices(): array
    {
        return [
            ProductDefinition::class,
            ProductSolver::class,
            ProductRepository::class,
            ProductBuilder::class,
        ];
    }

    public function getDefinition(): DefinitionInterface
    {
        return ProductDefinition::getInstance();
    }

    public function getSolver(): ProductSolver
    {
        return ProductSolver::getInstance();
    }

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

    public function getBuilder(): ProductBuilder
    {
        return ProductBuilder::getInstance();
    }
}