src/Plugins/PluginFactory.php
public function createPlugin(PluginConfigurationInterface $pluginConfiguration)
    {

        // load the plugin instance from the DI container and set the plugin configuration
        $pluginInstance = $this->container->get($pluginConfiguration->getId());
        $pluginInstance->setPluginConfiguration($pluginConfiguration);

        // return the plugin instance
        return $pluginInstance;
    }
public function createPlugin(PluginConfigurationInterface $pluginConfiguration)
    {

        // load the plugin instance from the DI container and set the plugin configuration
        $pluginInstance = $this->container->get($pluginConfiguration->getId());
        $pluginInstance->setPluginConfiguration($pluginConfiguration);

        // return the plugin instance
        return $pluginInstance;
    }
Factory method to create new plugin instance.

@param \TechDivision\Import\Configuration\PluginConfigurationInterface $pluginConfiguration The plugin configuration

@return \TechDivision\Import\Plugins\PluginInterface The plugin instance