<?php

namespace DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\Infrastructure\Service\Listener\Items\Hookable;

use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\Infrastructure\Service\Listener\Abstraction\AbstractServiceListener;
use DropshippingExportFreeVendor\WPDesk\Library\DropshippingExport\Infrastructure\Service\Container\Abstraction\ServiceContainerInterface;
/**
 * Class HookableServiceListener, checks if service implements hookable interface and run it.
 *
 * @package WPDesk\Library\DropshippingExport\Infrastructure\Service\Listener\Hookable
 */
final class HookableServiceListener extends AbstractServiceListener
{
    /**
     * @see AbstractServiceListener::update()
     */
    public function update($service, ServiceContainerInterface $service_container)
    {
        if ($service instanceof Hookable) {
            $service->hooks();
        }
    }
}
