Register the module service provider.

@param $pluggable

@throws FileNotFoundException
438750
protected function registerServiceProvider($pluggable)
    {
        $pluggable = Str::studly($pluggable['slug']);
        $file = $this->getPath()."/{$pluggable}/Providers/{$pluggable}ServiceProvider.php";
        $namespace = $this->getNamespace()."{$pluggable}\\Providers\\{$pluggable}ServiceProvider";

        if (!$this->files->exists($file)) {
            $message = "Pluggable [{$pluggable}] must have a \"{$pluggable}/Providers/{$pluggable}ServiceProvider.php\" file";

            throw new FileNotFoundException($message);
        }

        App::register($namespace);
    }
879839
public function registerModules(string $filePath = null)
    {
        is_file($filePath) || $filePath = App::getBasePath() . $filePath;

        if (is_file($filePath)) {
            /** @var Registry $modules */

            /** @noinspection PhpIncludeInspection */
            $modules = require_once $filePath;

            $modules = is_array($modules) ? $modules : [];

            foreach ($modules as $module) {
                IOC::resolve('Modules')->register($module);
            }

            Event::dispatch('minimal.loaded.modules', [$filePath, $modules]);
        }
    }
412697
public function registerAssetBundle()
    {
        if (isset($this->clientOptions['plugins']) && in_array('drag_drop', $this->clientOptions['plugins'])) {
            JuiAsset::register($this->getView());
        }
        MicroPluginAsset::register($this->getView());
        SifterAsset::register($this->getView());
        SelectizeAsset::register($this->getView());
    }
136454
def register(self, plugin, name=None):
        
        plugin_name = name or self.get_canonical_name(plugin)

        if plugin_name in self._name2plugin or plugin in self._plugin2hookcallers:
            if self._name2plugin.get(plugin_name, -1) is None:
                return  # blocked plugin, return None to indicate no registration
            raise ValueError(
                "Plugin already registered: %s=%s\n%s"
                % (plugin_name, plugin, self._name2plugin)
            )

        # XXX if an error happens we should make sure no state has been
        # changed at point of return
        self._name2plugin[plugin_name] = plugin

        # register matching hook implementations of the plugin
        self._plugin2hookcallers[plugin] = hookcallers = []
        for name in dir(plugin):
            hookimpl_opts = self.parse_hookimpl_opts(plugin, name)
            if hookimpl_opts is not None:
                normalize_hookimpl_opts(hookimpl_opts)
                method = getattr(plugin, name)
                hookimpl = HookImpl(plugin, plugin_name, method, hookimpl_opts)
                hook = getattr(self.hook, name, None)
                if hook is None:
                    hook = _HookCaller(name, self._hookexec)
                    setattr(self.hook, name, hook)
                elif hook.has_spec():
                    self._verify_hook(hook, hookimpl)
                    hook._maybe_apply_history(hookimpl)
                hook._add_hookimpl(hookimpl)
                hookcallers.append(hook)
        return plugin_name
94972
public function registerPlugin($plugin)
    {
        /** @var AnaloguePluginInterface $plugin */
        $plugin = new $plugin($this);

        $this->events = array_merge($this->events, $plugin->getCustomEvents());

        $plugin->register();
    }
1267602
public function register()
    {
        $this->helper_callbacks = array();
        $arguments= func_get_args();
        if(count($arguments) > 0){
            foreach($arguments as $argument){
                if($argument instanceof Plugin){ //this is a plugin object
                    $callback = $argument->getEventHelperCallback($this->getName());
                    if(is_callable($callback)){
                        $this->helper_callbacks[] = $callback;
                    }                 
                }
                else if(is_callable($argument)){ //this is a closure
                    $this->helper_callbacks[] = $argument;
                }
            }
        }

        return $this; //return the event object reference to allow chainable calls
    }
952378
public static function registerModule(string $name): void
    {
        if (!isset(static::$registeredModules[$name])) {
            $modulePath = static::getModulePath($name);

            static::prependIncludePath($modulePath . 'controllers', $modulePath . 'library');
            static::$registeredModules[$name] = true;
            $initPath = $modulePath . 'init.php';

            if (is_file($initPath)) {
                require $initPath;
            }
        }
    }
845674
public function registerPlugins()
    {
        foreach($this->activePlugins() as $plugin){
            $className = $plugin->parseNamespace()."\\Plugin";
            if(class_exists($className)) {
                $pluginInstance = new $className();
                if ($plugin->isActive() && method_exists($pluginInstance, 'register')) {
                    $pluginInstance->register();
                    $this->registeredPlugins[] = $plugin;
                }
            }
        }
        return;
    }
419238
protected function registerTelescopeServiceProvider()
    {
        $namespace = str_replace_last('\\', '', $this->getAppNamespace());

        $appConfig = file_get_contents(config_path('app.php'));

        if (Str::contains($appConfig, $namespace.'\\Providers\\TelescopeServiceProvider::class')) {
            return;
        }

        $lineEndingCount = [
            "\r\n" => substr_count($appConfig, "\r\n"),
            "\r" => substr_count($appConfig, "\r"),
            "\n" => substr_count($appConfig, "\n"),
        ];

        $eol = array_keys($lineEndingCount, max($lineEndingCount))[0];

        file_put_contents(config_path('app.php'), str_replace(
            "{$namespace}\\Providers\EventServiceProvider::class,".$eol,
            "{$namespace}\\Providers\EventServiceProvider::class,".$eol."        {$namespace}\Providers\TelescopeServiceProvider::class,".$eol,
            $appConfig
        ));

        file_put_contents(app_path('Providers/TelescopeServiceProvider.php'), str_replace(
            "namespace App\Providers;",
            "namespace {$namespace}\Providers;",
            file_get_contents(app_path('Providers/TelescopeServiceProvider.php'))
        ));
    }
574438
public function register()
    {
        foreach (array_keys(config('modules.locations')) as $location) {
            $repository = $this->repository($location);
            $modules    = $repository->enabled();

            $modules->each(function ($module) use ($repository) {
                try {
                    $this->registerServiceProvider($repository, $module);

                    $this->autoloadFiles($module);
                } catch (ModuleNotFoundException $e) {
                    //
                }
            });
        }
    }
994111
public function register()
    {
        // Auto register the support service provider
        if (! get_class($this) == SupportServiceProvider::class) {
            $this->app->register(SupportServiceProvider::class);
        }

        $this->viewsPath  = Str::replace($this->viewsPath, '{resourcesPath}', $this->getResourcesPath());
        $this->assetsPath = Str::replace($this->assetsPath, '{resourcesPath}', $this->getResourcesPath());

        $router = $this->app->make('router');
        $kernel = $this->app->make('Illuminate\Contracts\Http\Kernel');

        $this->registerConfigFiles();

        foreach ($this->prependMiddleware as $middleware) {
            $kernel->prependMiddleware($middleware);
        }

        foreach ($this->middleware as $middleware) {
            $kernel->pushMiddleware($middleware);
        }

        foreach ($this->routeMiddleware as $key => $middleware) {
            $router->middleware($key, $middleware);
        }

        foreach ($this->providers as $provider) {
            $this->app->register($provider);
        }

        foreach ($this->deferredProviders as $provider) {
            $this->app->registerDeferredProvider($provider);
        }

        foreach ($this->bindings as $binding => $class) {
            $this->app->bind($binding, $class);
        }

        foreach ($this->singletons as $binding => $class) {
            if ($this->strict && ! class_exists($class) && ! interface_exists($class)) {
                throw new \Exception(get_called_class() . ": Could not find alias class [{$class}]. This exception is only thrown when \$strict checking is enabled");
            }
            $this->app->singleton($binding, $class);
        }

        foreach ($this->aliases as $alias => $full) {
            if ($this->strict && ! class_exists($full) && ! interface_exists($full)) {
                throw new \Exception(get_called_class() . ": Could not find alias class [{$full}]. This exception is only thrown when \$strict checking is enabled");
            }
            $this->app->alias($alias, $full);
        }

        if (is_array($this->commands) and count($this->commands) > 0) {
            $this->commands($this->commands);
        }

        AliasLoader::getInstance($this->facades)->register();

        $this->requireHelpersFor('register');

        return $this->app;
    }
537092
public function register()
    {
        // If script is running CLI we don't activate this plugin
        if ($this->app->runningInConsole())
        {
            return;
        }

        // Default package configuration
        $this->mergeConfig();
        
        // Register singleton
        $this->app->singleton('active', function ($app) {
           return new Active($app['router']->current()->getName());
        });
        
        // Register Facade
        $loader = \Illuminate\Foundation\AliasLoader::getInstance();
        $loader->alias('Active', Facades\Active::class);
    }
564161
public function registerPlugin(Plugin $plugin)
    {
        try {
            $this->smarty->registerPlugin($plugin->getType(), $plugin->getName(), $plugin->getCallbackFunction(),
                $plugin->getAttribute('Cachable', true), $plugin->getAttribute('CacheAttr', null));
        } catch (\SmartyException $e) {
            throw new SmartyException($e);
        }
    }
210069
protected function registerAdapterPlugger()
    {
        $this->app->bind('adapter.plugger', function ($app) {
            $collection = new Collection;

            return new AdapterPlugger($collection, $app['config']);
        });

        $this->app->alias('adapter.plugger', AdapterPlugger::class);
    }
1353357
protected function registerHorizonServiceProvider()
    {
        $namespace = Str::replaceLast('\\', '', $this->getAppNamespace());

        $appConfig = file_get_contents(config_path('app.php'));

        if (Str::contains($appConfig, $namespace.'\\Providers\\HorizonServiceProvider::class')) {
            return;
        }

        file_put_contents(config_path('app.php'), str_replace(
            "{$namespace}\\Providers\EventServiceProvider::class,".PHP_EOL,
            "{$namespace}\\Providers\EventServiceProvider::class,".PHP_EOL."        {$namespace}\Providers\HorizonServiceProvider::class,".PHP_EOL,
            $appConfig
        ));

        file_put_contents(app_path('Providers/HorizonServiceProvider.php'), str_replace(
            "namespace App\Providers;",
            "namespace {$namespace}\Providers;",
            file_get_contents(app_path('Providers/HorizonServiceProvider.php'))
        ));
    }
1362788
protected function registerPlugin() {
		$js = [];

		$view = $this->getView();

		CKEditorAsset::register($view);

		$id = $this->options['id'];

		$options = $this->clientOptions !== false && !empty($this->clientOptions)
			? Json::encode($this->clientOptions)
			: '{}';

		if ($this->disableAutoInline) {
			$js[] = "CKEDITOR.disableAutoInline = true;";
		}
		$js[] = "CKEDITOR.inline('$id', $options);";

		if (isset($this->clientOptions['filebrowserUploadUrl'])) {
			$js[] = "mranger.ckeditorWidget.registerCsrfImageUploadHandler();";
		}

		$view->registerJs(implode("\n", $js));
	}
1198432
public function registerConfiguredProviders()
	{
		$manifestPath = $this->basePath() . '/vendor/services.json';

		(new ProviderRepository($this, new Filesystem, $manifestPath))
		            ->load($this->config['app.providers']);
	}