<?php

namespace common\logic\Order\Order\Module;

use common\logic\AbstractModule;
use common\logic\Order\Order\Repository\OrderRepository;
use common\logic\Order\Order\Service\OrderBuilder;
use common\logic\Order\Order\Service\OrderDefinition;
use common\logic\Order\Order\Service\OrderDocumentManager;
use common\logic\Order\Order\Service\OrderSolver;
use common\logic\Order\Order\Service\OrderManager;
use common\logic\Order\Order\Service\TillerManager;

/**
 * @mixin OrderDefinition
 * @mixin OrderSolver
 * @mixin OrderRepository
 * @mixin OrderBuilder
 * @mixin OrderDocumentManager
 */
class OrderModule extends AbstractModule
{
    public function getServices(): array
    {
        return [
            OrderDefinition::class,
            OrderSolver::class,
            OrderRepository::class,
            OrderBuilder::class,
            OrderManager::class,
            OrderDocumentManager::class,
            TillerManager::class,
        ];
    }

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

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

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

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

    public function getManager(): OrderManager
    {
        return OrderManager::getInstance();
    }

    public function getDocumentManager(): OrderDocumentManager
    {
        return OrderDocumentManager::getInstance();
    }

    public function getTillerManager(): TillerManager
    {
        return TillerManager::getInstance();
    }
}