<?php
declare(strict_types=1);

namespace App\DataPersister\Organization;

use App\DataPersister\EntityDataPersister;
use App\Entity\Organization\Parameters;
use App\Service\OnChange\Organization\OnParametersChange;
use JetBrains\PhpStorm\Pure;

/**
 * Classe ParametersDataPersister qui est un custom dataPersister gérant la resource Parameters
 */
class ParametersDataPersister extends EntityDataPersister
{
    #[Pure]
    public function __construct(
        OnParametersChange $onChange
    )
    {
        parent::__construct($onChange);
    }

    public function supports($data, array $context = []): bool
    {
        return $data instanceof Parameters;
    }
}
