Вход Регистрация
Файл: vendor/spatie/laravel-ignition/src/Recorders/DumpRecorder/MultiDumpHandler.php
Строк: 20
<?php

namespace SpatieLaravelIgnitionRecordersDumpRecorder;

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;
    }
}
Онлайн: 0
Реклама