<?php
declare(strict_types=1);
namespace Divante\Nuvei;
use Divante\Core\Service\InstallerInterface;
use Divante\Nuvei\Lifecycle\InstallerFactory;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\InstallContext;
use Shopware\Core\Framework\Plugin\Context\UpdateContext;
class DivanteNuvei extends Plugin
{
public function install(InstallContext $installContext): void
{
$this->getInstaller()->install($installContext);
}
public function update(UpdateContext $updateContext): void
{
$this->getInstaller()->update($updateContext);
}
protected function getInstaller(): InstallerInterface
{
$factory = new InstallerFactory($this->container);
return $factory->create();
}
}