<?php
/**
 * BookiFlex Core
 *
 * @package    BookiFlex
 * @subpackage Core
 * @author     BookiFlex
 * @copyright  Copyright (c) 2025 BookiFlex
 * @license    GPL-2.0-or-later
 *
 * @link       https://bookiflex.com
 */


declare(strict_types=1);
namespace BookiFlex\Core\Contract\DeferrerEvent\Trait;

defined( 'ABSPATH' ) || exit;

trait LatestEventTrait
{
    private readonly string $identifier;
    private bool $isLast = false;

    public function lastEvent(bool $value): void
    {
        $this->isLast = $value;
    }

    public function isLastEvent(): bool
    {
        return $this->isLast;
    }

    public function getIdentifier(): string
    {
        return $this->identifier;
    }
}
