getHandlerQueue

@param mixed $event

@return PriorityInterface
517080
private function getHandlerQueue($event)
    {
        if (!isset($this->handlers[$event])) {
            $this->handlers[$event] = new Priority;
        }

        return $this->handlers[$event];
    }
611778
protected function getHandler()
    {
        $stack = HandlerStack::create();

        foreach ($this->middlewares as $middleware) {
            $stack->push($middleware);
        }

        return $stack;
    }
1140200
public function handleApiEvent($event)
    {
        $eventName = str_replace('.queued', null, $event->name);
        $ckey = 'event:' . $eventName;
        $records = Cache::remember($ckey, Config::get('df.default_cache_ttl'), function () use ($eventName) {
            return ServiceEventMap::whereEvent($eventName)->get()->all();
        });
        if (empty($records)) {
            // Look for wildcard events by service (example: user.*)
            $serviceName = substr($eventName, 0, strpos($eventName, '.'));
            $wildcardEvent = $serviceName . '.*';
            $ckey = 'event:' . $wildcardEvent;
            $records = Cache::remember($ckey, Config::get('df.default_cache_ttl'), function () use ($wildcardEvent) {
                return ServiceEventMap::whereEvent($wildcardEvent)->get()->all();
            });
        }

        /** @var BaseModel $record */
        foreach ($records as $record) {
            Log::debug('Service event handled: ' . $eventName);
            /** @var BaseRestService $service */
            $service = \ServiceManager::getServiceById($record->service_id);
            Event::fire(new ServiceAssignedEvent($service, $event, $record->toArray()));
        }
    }
474615
public function dispatch($event) {
        if ( ! $event instanceof IEvent) {
            $event = $this->createEvent($event);
        }

        foreach ($this->subscriptions as $subscription) {
            if ( ! $event->isActive()) {
                return $event;
            }

            if ($subscription === null ||
                $subscription->getEventName() !== $event->getName()
            ) {
                continue;
            }

            $this->invokeSubscription($subscription, $event);
        }

        return $event;
    }
453257
public function findHandlerScenarioFor(Dispatchable $event)
    {
        $eventName = $event->getEventName();

        $this->assertEventCanBeHandled($eventName);

        return $this->make($event->getEventName());
    }
590223
public function handle(string $event, callable $callback, int $priority = 0): Route
    {
        return $this->collection->createRoute($event, $callback)->set('priority', $priority);
    }
744521
protected function getQueuedStatus($event)
    {
        if (isset($event->data['__laravel_notification_queued'])) {
            return $event->data['__laravel_notification_queued'];
        }

        return $event->data['__telescope_queued'] ?? false;
    }
259026
protected function getPayloadFromEvent($event)
    {
        if (method_exists($event, 'broadcastWith')) {
            return array_merge(
                $event->broadcastWith(), ['socket' => data_get($event, 'socket')]
            );
        }

        $payload = [];

        foreach ((new ReflectionClass($event))->getProperties(ReflectionProperty::IS_PUBLIC) as $property) {
            $payload[$property->getName()] = $this->formatProperty($property->getValue($event));
        }

        unset($payload['broadcastQueue']);

        return $payload;
    }
498467
public function getHandler(string $handler): Handler
    {
        if (!isset($this->handlers[$handler])) {
            if (!class_exists($handler) || !class_implements($handler, Handler::class)) {
                throw new \RuntimeException("No handler found for '$handler'.");
            }

            $instance = new $handler();
            $this->handlers[$handler] = $instance;
        } else {
            $instance = $this->handlers[$handler];
        }

        return $instance;
    }
641485
public static function queue($enable = null, $handler = null)
    {
        if ($enable === null && $handler === null) {
            return self::$enableQueue;
        }
        if (is_callable($enable)) {
            $handler = $enable;
            $enable = true;
        }
        self::$enableQueue = (bool) $enable;
        if (is_callable($handler)) {
            self::$howToUseQueue = $handler;
        }

        return self::$enableQueue;
    }
1047934
public static function on($event, $fn, $priority = 0)
    {
        if (!static::bound($event)) {
            static::$events[$event] = [];
        }

        static::$events[$event][] = new Listener($fn, $priority);

        uasort(static::$events[$event], function (Listener $a, Listener $b) {
            return $a->getPriority() < $b->getPriority();
        });
    }
1034624
protected function buildHandlerFunction($event) {
        return 'Void ' . $this->getHandlerFunctionName($event) . '(CMlEvent Event) {' . PHP_EOL
            . $event->getCode() . PHP_EOL
            . '}' . PHP_EOL;
    }
903953
public function queue($event)
    {
        $connection = $event instanceof ShouldBroadcastNow ? 'sync' : null;

        if (is_null($connection) && isset($event->connection)) {
            $connection = $event->connection;
        }

        $queue = null;

        if (method_exists($event, 'broadcastQueue')) {
            $queue = $event->broadcastQueue();
        } elseif (isset($event->broadcastQueue)) {
            $queue = $event->broadcastQueue;
        } elseif (isset($event->queue)) {
            $queue = $event->queue;
        }

        $this->container->make('queue')->connection($connection)->pushOn(
            $queue, new BroadcastEvent(clone $event)
        );
    }
1327050
public function wantToExecute($event)
    {
        return parent::wantToExecute($event)
            && (empty($this->operationName)
                || ($this->operationName === $event->getKey())
            );
    }
1092036
public function hasListenerQueue($event): bool
    {
        if ($event instanceof EventInterface) {
            $event = $event->getName();
        }

        return isset($this->listeners[$event]);
    }
151228
public function getListenerPriority($listener, $event)
    {
        if ($event instanceof EventInterface) {
            $event = $event->getName();
        }

        if (isset($this->listeners[$event])) {
            return $this->listeners[$event]->getPriority($listener);
        }

        return null;
    }
217054
public function getListeners($event = null){
        if (!$event){
            return $this->listeners;
        }
        return isset($this->listeners[$event]) ? $this->listeners[$event] : null;
    }