diff --git a/Model/Strategy/ExportToModule.php b/Model/Strategy/ExportToModule.php deleted file mode 100644 index 489ec21e1e9243dda2bb1758743e090c66d4486d..0000000000000000000000000000000000000000 --- a/Model/Strategy/ExportToModule.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php -declare(strict_types=1); - -namespace Firegento\ContentProvisioning\Model\Strategy; - -use Firegento\ContentProvisioning\Api\StrategyInterface; - -class ExportToModule implements StrategyInterface -{ - - /** - * @return string - */ - public function getTargetPath(): string - { - // TODO: Implement getTargetPath() method. - } -} diff --git a/Model/Strategy/ExportToVar.php b/Model/Strategy/ExportToVar.php deleted file mode 100644 index 89073321b22bcde31f1822efe807b5c0a2c8d33c..0000000000000000000000000000000000000000 --- a/Model/Strategy/ExportToVar.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php -declare(strict_types=1); - -namespace Firegento\ContentProvisioning\Model\Strategy; - -use Firegento\ContentProvisioning\Api\StrategyInterface; - -class ExportToVar implements StrategyInterface -{ - - /** - * @return string - */ - public function getTargetPath(): string - { - // TODO: Implement getTargetPath() method. - } -} diff --git a/Model/Strategy/Provider.php b/Model/Strategy/Provider.php deleted file mode 100644 index 25698dfb974e78372963f4e38e8bb057ef3d02e7..0000000000000000000000000000000000000000 --- a/Model/Strategy/Provider.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -declare(strict_types=1); - -namespace Firegento\ContentProvisioning\Model\Strategy; - -use Firegento\ContentProvisioning\Api\StrategyInterface; -use Firegento\ContentProvisioning\Api\StrategyProviderInterface; -use Magento\Framework\Exception\InputException; -use Magento\Framework\Exception\NotFoundException; - -class Provider implements StrategyProviderInterface -{ - /** - * @var array|StrategyInterface[] - */ - private $strategies; - - /** - * Provider constructor. - * @param StrategyInterface[] $strategies - * @throws InputException - */ - public function __construct(array $strategies) - { - foreach ($strategies as $strategy) { - if (!($strategy instanceof StrategyInterface)) { - throw new InputException(__( - 'Strategy must be instance of %interface', - ['interface' => StrategyInterface::class] - )); - } - } - $this->strategies = $strategies; - } - - /** - * @param string $strategyCode - * @return StrategyInterface - * - * @throws NotFoundException - */ - public function get(string $strategyCode): StrategyInterface - { - $strategy = $this->strategies[$strategyCode] ?? null; - - if (!$strategy) { - throw new NotFoundException(__('Strategy %strategy_code not found.', ['strategy_code' => $strategyCode])); - } - - return $strategy; - } -}