<?php

namespace common\logic\Order\ProductOrder\Module;

use common\logic\AbstractModule;
use common\logic\Order\ProductOrder\Repository\ProductOrderRepository;
use common\logic\Order\ProductOrder\Service\ProductOrderBuilder;
use common\logic\Order\ProductOrder\Service\ProductOrderDefinition;
use common\logic\Order\ProductOrder\Service\ProductOrderSolver;

/**
 * @mixin ProductOrderDefinition
 * @mixin ProductOrderSolver
 * @mixin ProductOrderRepository
 * @mixin ProductOrderBuilder
 */
class ProductOrderModule extends AbstractModule
{
    public function getServices(): array
    {
        return [
            ProductOrderDefinition::class,
            ProductOrderSolver::class,
            ProductOrderRepository::class,
            ProductOrderBuilder::class,
        ];
    }

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

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

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

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