6 declare(strict_types=1);
11 use Psr\Log\LoggerInterface;
21 private $objectManager;
40 LoggerInterface $logger,
43 $this->objectManager = $objectManger;
45 $this->formats = $formats;
53 if (!isset($this->formats[
$format])) {
54 throw new \Magento\Framework\Exception\InputException(
60 throw new \Magento\Framework\Exception\InputException(
66 return $this->objectManager->create(
70 }
catch (\Exception $e) {
71 $this->logger->error($e->getMessage());
72 throw new \Magento\Framework\Exception\RuntimeException(
73 new \
Magento\Framework\
Phrase(
'There has been an error with import'),
is_subclass_of($obj, $className)
__construct(ObjectManagerInterface $objectManger, LoggerInterface $logger, array $formats)
create(array $data, string $format=FeedFactoryInterface::FORMAT_RSS)