Register the listeners for the subscriber.

@param  \Illuminate\Events\Dispatcher  $events
776773
public function subscribe(Dispatcher $events)
    {
        if (!app()->make('antares.installed')) {
            return;
        }

        $events->listen(
                ComponentActivated::class, static::class . '@onActivated'
        );

        $events->listen(
                ComponentInstalled::class, static::class . '@onInstalled'
        );

        $events->listen(
                ComponentDeactivated::class, static::class . '@onDeactivated'
        );

        $events->listen(
                ComponentUninstalled::class, static::class . '@onUninstalled'
        );

        $events->listen(
            ComponentInstallationFailed::class, static::class . '@onFailed'
        );

        $events->listen(
                Failed::class, static::class . '@onComposerFailed'
        );
    }
1196585
static private function bindEventListenersEvents()
    {
    	if (self::$_eventListeners && !self::$_elInstances) {
    		foreach (self::$_eventListeners as $class => $listeners) {
    			if ($listeners) foreach ($listeners as $listener) {
    				
    				$listener = self::getListener($listener);
    				
    				$events = $listener->events();
    				
    				if ($events) foreach ($events as $name => $handler) {
    					Event::on($class, $name, is_string($handler) ? [$listener, $handler] : $handler);
    				}
    			}
    		}
    	}
    }
933667
public function dispatch($event): void
    {
        Assertion::isObject($event, 'An event should be an object');

        $eventName = get_class($event);
        $eventSubscribers = array_merge(
            $this->subscribedToAllEvents,
            $this->subscribers[$eventName] ?? []
        );

        foreach ($eventSubscribers as $eventSubscriber) {
            $eventSubscriber($event);
        }
    }
276960
public static function register($event, $listener) {
            if (!is_subclass_of($listener, Listener::class)) {
                throw new RegisterNonListenerException();
            }

            foreach (self::$listeners as $ev => $registered_listeners) {
                if ($ev & $event && !in_array($listener, $registered_listeners)) {
                    self::$listeners[ $ev ][] = $listener;
                }
            }
        }
328111
protected function registerEvents()
    {
        $events = $this->app->make(Dispatcher::class);

        foreach ($this->events as $event => $listeners) {
            foreach ($listeners as $listener) {
                $events->listen($event, $listener);
            }
        }
    }
327930
protected function listen()
    {
        $events = app('events');
        if (isset($this->listen)) {
            foreach ($this->listen as $event => $listeners) {
                foreach ($listeners as $listener) {
                    $events->listen($event, $listener);
                }
            }
        }
        
        if (isset($this->subscribe)) {
            foreach ($this->subscribe as $subscriber) {
                $events->subscribe($subscriber);
            }
        }
    }
227843
public function subscribe($events)
	{
		$events->listen('Neonbug\Common\Events\AdminAddSavePreparedFields', function($event) {
			$this->handlePreparedFieldsEvent($event);
		});
		
		$events->listen('Neonbug\Common\Events\AdminEditSavePreparedFields', function($event) {
			$this->handlePreparedFieldsEvent($event);
		});
		
		$events->listen('Neonbug\Common\Events\AdminEditPreparedFields', function($event) {
			$interfaces = class_implements($event->class_name);
			if (!array_key_exists('Neonbug\Common\Traits\PasswordTraitInterface', $interfaces)) return;
			
			$class_name = $event->class_name;
			$password_fields = $class_name::getPasswordFields();
			
			if (sizeof($password_fields) > 0)
			{
				foreach ($event->fields as $type=>$fields)
				{
					foreach ($fields as $idx=>$field)
					{
						$field_name = $field['name'];
						if (!in_array($field_name, $password_fields)) continue;
						
						$event->fields[$type][$idx]['value'] = '';
					}
				}
			}
		});
	}
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);
        });
    }
521120
public function boot(DispatcherContract $events = null)
    {
        parent::boot($events);

        foreach ($this->handlers as $handler) {
            app($handler)->handle();
        }
    }
1067922
public function subscribe($events)
    {
        $events->listen('*.entity.created', __CLASS__.'@entityCreated');
        $events->listen('*.entity.updated', __CLASS__.'@entityUpdated');
        $events->listen('*.entity.deleted', __CLASS__.'@entityDeleted');
    }
1036853
public function addEventListener($events, $listener)
    {
        if (\is_string($listener)) {
            if ($this->initialized) {
                throw new \RuntimeException('Adding lazy-loading listeners after construction is not supported.');
            }

            $hash = '_service_'.$listener;
        } else {
            // Picks the hash code related to that listener
            $hash = spl_object_hash($listener);
        }

        foreach ((array) $events as $event) {
            // Overrides listener if a previous one was associated already
            // Prevents duplicate listeners on same event (same instance only)
            $this->listeners[$event][$hash] = $listener;
        }
    }
1281422
public function subscribe($events)
    {
        $events->listen(
            Created::class,
            'Laranix\Auth\Password\Reset\Events\Subscriber@onCreated'
        );

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

        $events->listen(
            VerifyAttempt::class,
            'Laranix\Auth\Password\Reset\Events\Subscriber@onVerifyAttempt'
        );

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

        $events->listen(
            Reset::class,
            'Laranix\Auth\Password\Reset\Events\Subscriber@onCompleted'
        );

        $events->listen(
            ForgotAttempt::class,
            'Laranix\Auth\Password\Reset\Events\Subscriber@onCreateUpdateAttempt'
        );
    }
226659
public function subscribe($events)
	{
		$events->listen('Neonbug\Common\Events\AdminAddSavePreparedFields', function($event) {
			$interfaces = class_implements($event->class_name);
			if (!array_key_exists('Neonbug\Common\Traits\SlugTraitInterface', $interfaces)) return;
			
			$class_name = $event->class_name;
			$generate_from = $class_name::getGenerateSlugFrom();
			
			$resource_repo = App::make('ResourceRepository');
			
			$duplicate_slug_postfixes = [ 
				date('Y'), date('m'), date('d'), mt_rand(1, 100000)
			]; //things to try to add when a duplicate is found
			
			$found = false;
			foreach ($event->fields as $id_language=>$fields)
			{
				if ($id_language == -1) continue;
				
				foreach ($fields as $field_name=>$field_value)
				{
					if ($field_name == $generate_from)
					{
						$slug = str_slug($field_value);
						$duplicate_idx = 0;
						while (true)
						{
							if (!$resource_repo->slugExists($event->route_prefix, $id_language, $slug)) break;
							
							if ($duplicate_idx >= sizeof($duplicate_slug_postfixes))
							{
								$slug = null;
								break;
							}
							
							$slug .= '-' . $duplicate_slug_postfixes[$duplicate_idx++];
						}
						
						if ($slug == null) break;
						
						$event->fields[$id_language]['slug'] = $slug;
						
						$found = true;
						break;
					}
				}
			}
			
			if ($found)
			{
				$event->language_dependent_fields[] = 'slug';
			}
		});
	}
1056793
public function subscribe($events)
    {
        $events->listen(
            ComponentItemDestroyed::class,
            'Larrock\Core\Plugins\ComponentPlugin@detach'
        );

        $events->listen(
            ComponentItemUpdated::class,
            'Larrock\Core\Plugins\ComponentPlugin@attach'
        );

        $events->listen(
            ComponentItemStored::class,
            'Larrock\Core\Plugins\ComponentPlugin@attach'
        );
    }
537321
public function subscribe(Dispatcher $events)
    {
        $events->listen(ConfigureApiRoutes::class, [$this, 'configureApiRoutes']);
        $events->listen(PrepareApiAttributes::class, [$this, 'prepareApiAttributes']);
    }
504492
protected function loadEvents(array $events = array())
    {
        foreach ($events as $event) {
            $method = 'set'.$event['type'].'s';
            $this->$method($event);
        }
    }
689805
private function addSubscribers(array $eventSubscribers)
    {
        foreach ($eventSubscribers as $eventSubscriber) {
            if (is_string($eventSubscriber)) {
                $eventSubscriber = new $eventSubscriber();
            } elseif (is_callable($eventSubscriber)) {
                $eventSubscriber = call_user_func($eventSubscriber, $this->dispatcher);
            }

            $this->dispatcher->addSubscriber($eventSubscriber);
        }

        return $this;
    }