2026-06-14 21:32:07 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
|
|
|
|
|
use Domain\Ports\Directories\CodeDirectory;
|
|
|
|
|
use Domain\Ports\Directories\ShopDirectory;
|
|
|
|
|
use Domain\Ports\Repositories\BasketRepository;
|
|
|
|
|
use Domain\Ports\Repositories\OrderRepository;
|
|
|
|
|
use Domain\Ports\Repositories\PickupExceptionRepository;
|
|
|
|
|
use Domain\Ports\Repositories\ProductRepository;
|
|
|
|
|
use Domain\Ports\Repositories\ShopperRepository;
|
|
|
|
|
use Domain\Ports\Repositories\ShopRepository;
|
|
|
|
|
use Domain\Ports\Services\AdminAuthenticationService;
|
2026-10-27 19:59:49 +01:00
|
|
|
use Domain\Ports\Services\CsvGenerator;
|
2026-06-14 21:32:07 +02:00
|
|
|
use Domain\Ports\Services\CustomerAuthenticationService;
|
|
|
|
|
use Domain\Ports\Services\EmployeeImportStorageService;
|
|
|
|
|
use Domain\Ports\Services\EmployeeStatisticsService;
|
|
|
|
|
use Domain\Ports\Services\TransactionManager;
|
|
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
use Infrastructure\Adapters\Directories\EloquentCodeDirectory;
|
|
|
|
|
use Infrastructure\Adapters\Directories\EloquentShopDirectory;
|
|
|
|
|
use Infrastructure\Adapters\Events\LaravelDomainEventDispatcher;
|
|
|
|
|
use Infrastructure\Adapters\Repositories\EloquentOrderRepository;
|
|
|
|
|
use Infrastructure\Adapters\Repositories\EloquentPickupExceptionRepository;
|
|
|
|
|
use Infrastructure\Adapters\Repositories\EloquentProductRepository;
|
|
|
|
|
use Infrastructure\Adapters\Repositories\EloquentShopperRepository;
|
|
|
|
|
use Infrastructure\Adapters\Repositories\EloquentShopRepository;
|
|
|
|
|
use Infrastructure\Adapters\Repositories\SessionBasketRepository;
|
|
|
|
|
use Infrastructure\Adapters\Services\AppAdminAuthService;
|
|
|
|
|
use Infrastructure\Adapters\Services\AppCustomerAuthService;
|
2026-10-27 19:59:49 +01:00
|
|
|
use Infrastructure\Adapters\Services\CsvGeneratorImpl;
|
2026-06-14 21:32:07 +02:00
|
|
|
use Infrastructure\Adapters\Services\EloquentEmployeeImportStorageService;
|
|
|
|
|
use Infrastructure\Adapters\Services\EloquentEmployeeStatisticsService;
|
|
|
|
|
use Infrastructure\Adapters\Services\LaravelTransactionManager;
|
|
|
|
|
use Shared\DDD\DomainEventDispatcher;
|
|
|
|
|
|
|
|
|
|
class DomainServiceProvider extends ServiceProvider
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Register any application services.
|
|
|
|
|
*/
|
|
|
|
|
#[\Override]
|
|
|
|
|
public function register(): void
|
|
|
|
|
{
|
|
|
|
|
$this->app->singleton(
|
|
|
|
|
DomainEventDispatcher::class,
|
|
|
|
|
LaravelDomainEventDispatcher::class
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$this->app->bind(
|
|
|
|
|
OrderRepository::class,
|
|
|
|
|
EloquentOrderRepository::class
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$this->app->bind(
|
|
|
|
|
PickupExceptionRepository::class,
|
|
|
|
|
EloquentPickupExceptionRepository::class
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$this->app->bind(
|
|
|
|
|
ShopperRepository::class,
|
|
|
|
|
EloquentShopperRepository::class
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$this->app->bind(
|
|
|
|
|
ShopRepository::class,
|
|
|
|
|
EloquentShopRepository::class
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$this->app->bind(
|
|
|
|
|
EmployeeStatisticsService::class,
|
|
|
|
|
EloquentEmployeeStatisticsService::class
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$this->app->bind(
|
|
|
|
|
ShopDirectory::class,
|
|
|
|
|
EloquentShopDirectory::class
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$this->app->bind(
|
|
|
|
|
AdminAuthenticationService::class,
|
|
|
|
|
AppAdminAuthService::class
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$this->app->bind(
|
|
|
|
|
CustomerAuthenticationService::class,
|
|
|
|
|
AppCustomerAuthService::class
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$this->app->bind(
|
|
|
|
|
ProductRepository::class,
|
|
|
|
|
EloquentProductRepository::class
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$this->app->bind(
|
|
|
|
|
BasketRepository::class,
|
|
|
|
|
SessionBasketRepository::class
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$this->app->bind(
|
|
|
|
|
TransactionManager::class,
|
|
|
|
|
LaravelTransactionManager::class
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$this->app->bind(
|
|
|
|
|
CodeDirectory::class,
|
|
|
|
|
EloquentCodeDirectory::class
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
$this->app->bind(
|
|
|
|
|
EmployeeImportStorageService::class,
|
|
|
|
|
EloquentEmployeeImportStorageService::class
|
|
|
|
|
);
|
2026-10-27 19:59:49 +01:00
|
|
|
|
|
|
|
|
$this->app->bind(
|
|
|
|
|
CsvGenerator::class,
|
|
|
|
|
CsvGeneratorImpl::class
|
|
|
|
|
);
|
2026-06-14 21:32:07 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Bootstrap any application services.
|
|
|
|
|
*/
|
|
|
|
|
public function boot(): void
|
|
|
|
|
{
|
|
|
|
|
//
|
|
|
|
|
}
|
|
|
|
|
}
|