/** * Singleton: returns an instance * * @return PlentymarketsImportControllerItemLinked */ public static function getInstance() { if (!self::$Instance instanceof self) { self::$Instance = new self(); } return self::$Instance; }
/** * Finalizes the import */ public function finish() { try { // Stock stack PlentymarketsImportItemStockStack::getInstance()->import(); } catch (Exception $E) { PlentymarketsLogger::getInstance()->error('Sync:Item:Stock', 'PlentymarketsImportItemStockStack failed'); PlentymarketsLogger::getInstance()->error('Sync:Item:Stock', $E->getMessage()); } try { // Stock stack PlentymarketsImportControllerItemLinked::getInstance()->run(); } catch (Exception $E) { PlentymarketsLogger::getInstance()->error('Sync:Item:Linked', 'PlentymarketsImportControllerItemLinked failed'); PlentymarketsLogger::getInstance()->error('Sync:Item:Linked', $E->getMessage()); } try { // Stock stack PlentymarketsImportItemImageThumbnailController::getInstance()->generate(); } catch (Exception $E) { PlentymarketsLogger::getInstance()->error('Sync:Item:Image', 'PlentymarketsImportItemImageThumbnailController failed'); PlentymarketsLogger::getInstance()->error('Sync:Item:Image', $E->getMessage()); } }