Register listeners

@param \Illuminate\Events\Dispatcher $events
17743
public function subscribe($events)
    {
        $events->listen(
            Authenticated::class,
            'Laranix\Auth\Events\Login\Subscriber@onAuthenticated'
        );

        $events->listen(
            Login::class,
            'Laranix\Auth\Events\Login\Subscriber@onLogin'
        );

        $events->listen(
            Failed::class,
            'Laranix\Auth\Events\Login\Subscriber@onFailed'
        );

        $events->listen(
            Lockout::class,
            'Laranix\Auth\Events\Login\Subscriber@onLockout'
        );

        $events->listen(
            Restricted::class,
            'Laranix\Auth\Events\Login\Subscriber@onLoginRestricted'
        );
    }
893774
@Inject @EventStoreListener
	public void setListeners(Collection<EventListener> listeners) {
		for (EventListener listener : listeners) {
			registerListener(listener);
		}
	}
698243
private function bindEventListenersEvents()
	{
		if ($this->_eventListeners && !$this->_listenerInstances) {
			foreach ($this->_eventListeners as $listener) {
                
				$listener = static::getListener($listener);
				
				$events = $listener->events();
				
				if ($events) foreach ($events as $name => $handler) {
					static::on($name, is_string($handler) ? [$listener, $handler] : $handler);
				}
			}
		}
	}
328111
protected function registerEvents()
    {
        $events = $this->app->make(Dispatcher::class);

        foreach ($this->events as $event => $listeners) {
            foreach ($listeners as $listener) {
                $events->listen($event, $listener);
            }
        }
    }
327513
protected static function registerObservableEvent($event, $callback)
    {
        if (! isset(static::$dispatcher)) {
            return ;
        }

        $className = get_called_class();

        $event = with(new static())->getObservableKey($event);

        static::$dispatcher->listen("{$event}: {$className}", $callback);
    }
628696
protected function makeEventAndListeners($event, $listeners)
    {
        if (! Str::contains($event, '\\')) {
            return;
        }

        $this->call('generate:event', ['name' => $event]);

        $this->makeListeners($event, $listeners);
    }
1042884
public function subscribe($events)
    {
        $events->listen(
            Created::class,
            'Laranix\Auth\User\Cage\Events\Subscriber@onCreated'
        );

        $events->listen(
            Updated::class,
            'Laranix\Auth\User\Cage\Events\Subscriber@onUpdated'
        );

        $events->listen(
            Expired::class,
            'Laranix\Auth\User\Cage\Events\Subscriber@onExpired'
        );

        $events->listen(
            Removed::class,
            'Laranix\Auth\User\Cage\Events\Subscriber@onRemoved'
        );

        $events->listen(
            Deleted::class,
            'Laranix\Auth\User\Cage\Events\Subscriber@onDeleted'
        );
    }
643734
protected function registerEventRebindHandler()
    {
        $this->app->rebinding('events', function ($app, $dispatcher) {
            if (! $app->resolved('auth')) {
                return;
            }

            if (method_exists($guard = $app['auth']->guard(), 'setDispatcher')) {
                $guard->setDispatcher($dispatcher);
            }
        });
    }
1018862
protected function registerLoadEvents($provider, array $events)
    {
        if (count($events) < 1) {
            return;
        }

        $this->app->make('events')->listen($events, function () use ($provider) {
            $this->app->register($provider);
        });
    }
190132
public function add_listener($event) {
		if (strpos('::', $event) === false) {
			$classname = get_called_class();
			$method = $event;
		} else {
			list($classname, $method) = explode('::', $event);
		}
		$event_name = strtolower(str_replace('\\', '_', $classname . '_' . $method));

		$dispatcher = \Skeleton\Event\Dispatcher::get();
		$dispatcher->add_listener($event_name, [ '\\Event\\' . $classname, $method ]);
	}
1020732
public function registerEventListeners()
    {
        if ( $this->loadGlobalEvents )
        {
            $listeners = eZINI::instance()->variable( 'Event', 'Listeners' );
            foreach ( $listeners as $listener )
            {
                // $listener may be empty if some override logic has been involved
                if ( $listener == "" )
                {
                    continue;
                }

                // format from ini is seperated by @
                list( $event, $callback ) = explode( '@', $listener );
                $this->attach( $event, $callback );
            }
        }
    }
112681
public function dispatch($event, $options)
    {
        $listeners = $this->eventDispatcher->getListeners($event);

        foreach ($listeners as $listener) {
            call_user_func($listener, $options);
        }
    }
362051
public function dispatch(array $events)
    {
        foreach($events as $event)
        {
            $eventName = $this->getEventName($event);

            $this->event->fire($eventName, $event);

            $this->log->info("{$eventName} was fired.");
        }
    }
47852
public function listenDispatchEvents(Listener\Dispatch $listener)
    {
        $this->di
                ->get('eventsManager')
                ->attach('dispatch', $listener, PHP_INT_MAX);
        return $this;
    }
662263
public function subscribe(Dispatcher $events)
    {
        $events->listen(PrepareUnserializedSettings::class, [$this, 'addUploadMethods']);
        $events->listen(PrepareApiAttributes::class, [$this, 'prepareApiAttributes']);
    }
535657
public function dispatch(array $events)
    {
        foreach ($events as $event) {
            $eventName = $this->getEventName($event);

            $this->app->fireEvent($eventName, $event);
            $this->app->logEvent($eventName .' was fired.');
        }
    }
444634
public function dispatch(EventInterface $event) : void
    {
        $eventName = $event->getName();
        $listeners = $this->dispatcher->getListeners($eventName);
        foreach ($listeners as $listener) {
            if (is_callable($listener)) {
                try {
                    $listener($event);
                } catch (\Throwable $e) {
                    throw new \InvalidArgumentException(
                        "Invalid callable as listener provided for event '{$eventName}',"
                        ." and it cannot be executed",
                        null,
                        $e
                    );
                }
            } else {
                try {
                    $listenerInstance = $this->getResolver()->get($listener);
                } catch (\Throwable $e) {
                    throw new ContainerServiceNotFound(
                        "Invalid service as listener '{$listener}' provided for event"
                        ." '{$eventName}', and it cannot be resolved",
                        null,
                        $e
                    );
                }
                if (!$listenerInstance instanceof ListenerInterface) {
                    throw new \InvalidArgumentException(
                        "Invalid service as listener '{$listener}' provided for event"
                        ." '{$eventName}', expected \Duktig\Core\Event\ListenerInterface"
                    );
                }
                $listenerInstance->handle($event);
            }
        }
    }