Register the listeners for the subscriber.

@param  Illuminate\Events\Dispatcher  $events
@return void
771281
public function subscribe($events)
	{
		$events->listen('Neonbug\Common\Events\AdminAddPreparedFields', function($event) {
			$interfaces = class_implements($event->class_name);
			if (!array_key_exists('Neonbug\Common\Traits\OrdTraitInterface', $interfaces)) return;
			
			$class_name = $event->class_name;
			foreach ($class_name::getOrdFields() as $field_name)
			{
				$new_value = $class_name::all()->max($field_name);
				$new_value = ($new_value === null ? 1 : intval($new_value) + 10);
				
				foreach ($event->fields['language_independent'] as $idx=>$field)
				{
					if ($field['name'] != $field_name) continue;
					
					$event->fields['language_independent'][$idx]['value'] = $new_value;
				}
			}
		});
	}
45262
def _register_event_listeners(self, cls):
        
        event.listen(cls, 'after_insert', self._new_listener)
        event.listen(cls, 'after_update', self._update_listener)
        event.listen(cls, 'after_delete', self._delete_listener)
524668
public function addListener(Listener $listener) : void {
        $this->listeners = $this->listeners->add($listener);
    }
732688
public function handle(Dispatcher $events)
    {
        $events->listen(Events\ModelIndexCreated::class, function ($event) {
            $this->comment("Index '$event->indexName' created with fields: $event->indexFields");
        });

        $events->listen(Events\ModelIndexUpdated::class, function ($event) {
            $this->comment("Index '$event->indexName' updated");
        });

        $events->listen(Events\ModelIndexDropped::class, function ($event) {
            $this->comment("Index '$event->indexName' dropped");
        });

        $events->listen(Events\ModelIndexIgnored::class, function ($event) {
            $this->comment("Existing Index '$event->indexName' ignored");
        });

        $model = $this->argument('model');
        $drop = $this->option('drop');

        if (!$model) {
            $modelDirectories = config('scout.mysql.model_directories');
            $searchableModels = $this->indexService->getAllSearchableModels($modelDirectories);

            foreach ($searchableModels as $searchableModel) {
                $drop ? $this->dropModelIndex($searchableModel) : $this->createOrUpdateModelIndex($searchableModel);
            }
        } else {
            $drop ? $this->dropModelIndex($model) : $this->createOrUpdateModelIndex($model);
        }
    }
837888
public function handle(Dispatcher $events)
    {
        $model = $this->argument('model');
        $this->service = app(RatingServiceContract::class);

        if (empty($model)) {
            $this->recountRatingOfAllModelTypes();
        } else {
            $this->recountRatingOfModelType($model);
        }
    }
1276343
public function subscribe(Dispatcher $events)
    {
        $events->listen(LoginEvent::class, UserAuthListener::class . '@onUserLogin');
        $events->listen(LogoutEvent::class, UserAuthListener::class . '@onUserLogout');
    }
41644
public function setEvents(array $events)
	{
		if ($events) {
			$this->ensureEvents();
			
			foreach ($events as $name => $handler) {
				$this->on($name, $handler);
			}
		}
	}
1176632
public function register(): void
    {
        $this->app->singleton(BroadcastManager::class);
        $this->app->singleton(SubscriptionRegistry::class);
        $this->app->singleton(StoresSubscriptions::class, StorageManager::class);

        $this->app->bind(ContextSerializer::class, Serializer::class);
        $this->app->bind(AuthorizesSubscriptions::class, Authorizer::class);
        $this->app->bind(SubscriptionIterator::class, SyncIterator::class);
        $this->app->bind(SubscriptionExceptionHandler::class, ExceptionHandler::class);
        $this->app->bind(BroadcastsSubscriptions::class, SubscriptionBroadcaster::class);
        $this->app->bind(ProvidesSubscriptionResolver::class, SubscriptionResolverProvider::class);
    }
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);
        });
    }
552547
public function attach(EventManagerInterface $events)
    {
        $this->listeners[] = $events->attach(
            ComposerEvent::EVENT_HEADERS_POST,
            array($this, 'injectOverrideHeaders'),
            -100 // The priority needs to be lower than the other plugins
        );
    }
1338969
public function registerListeners(array $listeners)
    {
        foreach ($listeners as $event => $listener) {
            $this->events[$event][] = $listener;
        }
    }
327380
public function register()
    {
        parent::register();

        $this->app->booted(function (Application $app) {
            $this->registerEventListeners($app->make('events'));
        });
    }
325833
public function register($subscribers)
    {
        is_array($subscribers) || $subscribers = [$subscribers];

        foreach ($subscribers as $subscriber) {
            $this->registerSubscriber($subscriber);
        }
    }
991839
public function dispatch(DomainEvents $events) : void {
        $events->each(function (DomainEvent $event) {
            $this->listeners->each(function (Listener $listener) use ($event) {
                    $listener->handle($event);
            });
        });
    }
471759
public function setEvents(array $events)
    {
        foreach ($events as $event) {
            $event->ensureStopped();
        }

        $this->data['events'] = $events;
    }
1340925
public function dispatch(Event $event) {

		$this->lastEvent = $event;
		$eventName = $event->getName();

		if (isset($this->registry[$eventName])) {

			foreach ($this->getSortedRegistry($eventName) as $listener) {
				call_user_func($listener, $event);
			}
			
		}

	}
759159
public function setEventClasses($events)
    {
        foreach ($events as $iface => $cls) {
            $this->setEventClass($iface, $cls);
        }
    }