File "MultiDumpHandler.php"

Full Path: /home/clickysoft/public_html/jmapi5.clickysoft.net/vendor/spatie/laravel-ignition/src/Recorders/DumpRecorder/MultiDumpHandler.php
File size: 501 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace Spatie\LaravelIgnition\Recorders\DumpRecorder;

class MultiDumpHandler
{
    /** @var array<int, callable|null> */
    protected array $handlers = [];

    public function dump(mixed $value): void
    {
        foreach ($this->handlers as $handler) {
            if ($handler) {
                $handler($value);
            }
        }
    }

    public function addHandler(callable $callable = null): self
    {
        $this->handlers[] = $callable;

        return $this;
    }
}