Register all configured middleware classes with the
appropriate App-level events.
341006
public function register() {
    $this->registerMiddleware();

    $this->app->before($this->createBeforeFilter());
    $this->app->after($this->createAfterFilter());
  }
1139528
private void registerNotifications() {
		ApptentiveNotificationCenter.defaultCenter()
			.addObserver(NOTIFICATION_ACTIVITY_STARTED, this)
			.addObserver(NOTIFICATION_ACTIVITY_RESUMED, this)
			.addObserver(NOTIFICATION_APP_ENTERED_FOREGROUND, this)
			.addObserver(NOTIFICATION_APP_ENTERED_BACKGROUND, this)
			.addObserver(NOTIFICATION_PAYLOAD_WILL_START_SEND, this)
			.addObserver(NOTIFICATION_PAYLOAD_DID_FINISH_SEND, this);
	}
964344
def register_class(self, cls, app_state=None):
        """"""
        state = app_state if app_state is not None else self.app_state

        for Adapter in self.adapters_cls:
            if Adapter.can_adapt(cls):
                break
        else:
            return

        cls_fqcn = fqcn(cls)
        self.adapted[cls_fqcn] = Adapter(cls, self.schemas["default"])
        state.indexed_classes.add(cls)
        state.indexed_fqcn.add(cls_fqcn)
749140
private void registerListeners() {
    protocol.registerExecuteHandler(this::execute);
    protocol.registerBackupHandler(this::backup);
    protocol.registerRestoreHandler(this::restore);
    protocol.registerCloseHandler(this::close);
    protocol.registerMetadataHandler(this::metadata);
  }
1249297
protected function registerServices()
    {
        $this->app->bindShared('modules', function ($app) {
            $path = $app['config']->get('modules.paths.modules');

            return new Repository($app, $path);
        });
    }
880385
private function registerApiMiddleware()
    {
        /** @var  \Illuminate\Contracts\Config\Repository  $config */
        $config = $this->app['config'];

        foreach ($config->get('api-helper.middleware', []) as $name => $class) {
            $this->aliasMiddleware($name, $class);
        };
    }
372016
def registerAllHandlers(self, handlerDict):
        '''
        
        '''
        self.handlers.update(handlerDict)
        if hasattr(handlerDict, 'keys'):
            self.scheduler.register(handlerDict.keys(), self)
        else:
            self.scheduler.register(tuple(h[0] for h in handlerDict), self)
        self._setDaemon()
385467
public void registerListenerExtensions() {
    if (listenerExtensionsRegistered) {
      throw H2O.fail("Listeners already registered");
    }

    long before = System.currentTimeMillis();
    ServiceLoader<H2OListenerExtension> extensionsLoader = ServiceLoader.load(H2OListenerExtension.class);
    for (H2OListenerExtension ext : extensionsLoader) {
      ext.init();
      listenerExtensions.put(ext.getName(), ext);
    }
    listenerExtensionsRegistered = true;
    registerListenerExtensionsMillis = System.currentTimeMillis() - before;
  }
3306
protected function registerServiceProviders()
    {
        $this->register(new EventServiceProvider($this));
        $this->register(new RoutingServiceProvider($this));

        foreach ($this->make('config')->get('app.providers') as $provider) {
            $this->register($provider);
        }
    }
94596
protected function registerEventListeners()
    {
        foreach ($this->events as $event => $listener) {
            Event::listen($event, $listener);
        }

        return $this;
    }
161552
public function registerHttpServiceProvider()
    {
        $this->registerRateLimiting();
        $this->registerHttpValidation();
        $this->registerHttpParsers();
        $this->registerResponseFactory();
        $this->registerMiddleware();
    }
428284
public function register()
    {
        $loader = AliasLoader::getInstance();

        // Register aliases
        foreach ($this->getAliases() as $alias => $class) {
            $loader->alias($alias, $class);
        }

        // Register service containers
        foreach ($this->getServiceContainers() as $abstract => $concrete) {
            $this->app->singleton($abstract, $concrete);
        }
    }
1035876
public function registerConfiguredProviders()
	{
		$manifestPath = $this->getCachedServicesPath();

		(new ProviderRepository($this, new Filesystem, $manifestPath))
					->load($this->config['app.providers']);
	}
366564
protected function registerBaseBindings()
    {
        static::setInstance($this);

        $this->instance('app', $this);

        $this->instance(Container::class, $this);

        $this->instance(PackageManifest::class, new PackageManifest(
            new Filesystem, $this->basePath(), $this->getCachedPackagesPath()
        ));
    }
1374475
private function registerEvents()
    {
        foreach ($this->getSetting('events', []) as $event => $listeners) {
            foreach ($listeners as $listener) {
                Event::bind($event, $listener);
            }
        }
    }
579369
protected function registerCombinerEvents()
    {
        if (App::runningInBackend() || App::runningInConsole()) {
            return;
        }

        Event::listen('cms.combiner.beforePrepare', function ($combiner, $assets) {
            $filters = array_flatten($combiner->getFilters());
            ThemeData::applyAssetVariablesToCombinerFilters($filters);
        });

        Event::listen('cms.combiner.getCacheKey', function ($combiner, $holder) {
            $holder->key = $holder->key . ThemeData::getCombinerCacheKey();
        });
    }
1097835
protected function registerServices()
    {
        foreach ($this->serviceBindings as $key => $value) {
            is_numeric($key)
                    ? $this->app->singleton($value)
                    : $this->app->singleton($key, $value);
        }
    }