HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/posscale/www/printmanager/vendor/livewire/livewire/src/Features/SupportEvents/Event.php
<?php

namespace Livewire\Features\SupportEvents;

use Livewire\Mechanisms\ComponentRegistry;

class Event
{
    protected $name;
    protected $params;
    protected $self;
    protected $component;

    public function __construct($name, $params)
    {
        $this->name = $name;
        $this->params = $params;
    }

    public function self()
    {
        $this->self = true;

        return $this;
    }

    public function component($name)
    {
        $this->component = $name;

        return $this;
    }

    public function to($name)
    {
        return $this->component($name);
    }

    public function serialize()
    {
        $output = [
            'name' => $this->name,
            'params' => $this->params,
        ];

        if ($this->self) $output['self'] = true;
        if ($this->component) $output['to'] = app(ComponentRegistry::class)->getName($this->component);

        return $output;
    }
}