12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace Controller;
- class ProductController
- {
- public $settingsRepository;
- public function __construct($settingsRepository)
- {
- $this->settingsRepository = $settingsRepository;
- }
- public function sync()
- {
- $marketplaceProductRepository = new \MarketplaceRepository\ProductRepository(
- $this->settingsRepository->getToken(),
- $this->settingsRepository->getShop()
- );
- $facturisProductRepository = new \Core\FacturisRepository\ProductRepository(
- $this->settingsRepository->getAuthApiKey(),
- $this->settingsRepository->getAuthUsername(),
- $this->settingsRepository->getAuthPassword(),
- $this->settingsRepository->getAuthFiscalCode()
- );
- $service = new \Core\App\Service\ProductService(
- $marketplaceProductRepository,
- $facturisProductRepository
- );
- $service->sync();
- }
-
- }
|