PHP 8.3.31
Preview: UniqueBroadcastEvent.php Size: 1.50 KB
/home/getspomw/royalsquad.us/vendor/laravel/framework/src/Illuminate/Broadcasting/UniqueBroadcastEvent.php

<?php

namespace Illuminate\Broadcasting;

use Illuminate\Container\Container;
use Illuminate\Contracts\Cache\Repository;
use Illuminate\Contracts\Queue\ShouldBeUnique;

class UniqueBroadcastEvent extends BroadcastEvent implements ShouldBeUnique
{
    /**
     * The unique lock identifier.
     *
     * @var mixed
     */
    public $uniqueId;

    /**
     * The number of seconds the unique lock should be maintained.
     *
     * @var int
     */
    public $uniqueFor;

    /**
     * Create a new event instance.
     *
     * @param  mixed  $event
     * @return void
     */
    public function __construct($event)
    {
        $this->uniqueId = get_class($event);

        if (method_exists($event, 'uniqueId')) {
            $this->uniqueId .= $event->uniqueId();
        } elseif (property_exists($event, 'uniqueId')) {
            $this->uniqueId .= $event->uniqueId;
        }

        if (method_exists($event, 'uniqueFor')) {
            $this->uniqueFor = $event->uniqueFor();
        } elseif (property_exists($event, 'uniqueFor')) {
            $this->uniqueFor = $event->uniqueFor;
        }

        parent::__construct($event);
    }

    /**
     * Resolve the cache implementation that should manage the event's uniqueness.
     *
     * @return \Illuminate\Contracts\Cache\Repository
     */
    public function uniqueVia()
    {
        return method_exists($this->event, 'uniqueVia')
                ? $this->event->uniqueVia()
                : Container::getInstance()->make(Repository::class);
    }
}

Directory Contents

Dirs: 1 × Files: 16

Name Size Perms Modified Actions
- drwxrwxrwx 2025-09-17 06:52:59
Edit Download
3.32 KB lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
1.22 KB lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
4.77 KB lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
127 B lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
13.21 KB lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
1.11 KB lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
727 B lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
1.27 KB lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
311 B lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
852 B lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
669 B lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
1.05 KB lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
1.47 KB lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
294 B lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
498 B lrw-rw-rw- 2025-09-17 06:52:59
Edit Download
1.50 KB lrw-rw-rw- 2025-09-17 06:52:59
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).