Initialize the plugins

        Query the configuration and the plugins for info
        (name, registry name, start priority, etc)
436644
def _initialize_plugins(self):
        
        logger.debug('Initializing plugins')
        plugins = self._pm.hook.plugins(loop=self._loop)
        if plugins:
            for plugin in plugins:
                name = plugin.__name__
                registry_name = plugin.__registry__ or plugin.__name__
                config = self.config.get(name, {})

                priority = config.get('priority', 50)

                if priority:
                    self._plugins[name] = {
                        'plugin': plugin,
                        'config': config,
                        'priority': priority,
                        'factory': registry_name
                    }

                    self._start_priority[priority].append(name)
        else:
            logger.error('No plugins found')
716889
def initialize_plugin(self):
        
        self.create_toggle_view_action()

        self.plugin_actions = self.get_plugin_actions() + [MENU_SEPARATOR,
                                                           self.undock_action]
        add_actions(self.options_menu, self.plugin_actions)
        self.options_button.setMenu(self.options_menu)
        self.options_menu.aboutToShow.connect(self.refresh_actions)

        self.sig_show_message.connect(self.show_message)
        self.sig_update_plugin_title.connect(self.update_plugin_title)
        self.sig_option_changed.connect(self.set_option)
        self.setWindowTitle(self.get_plugin_title())
443950
protected function init_pluginsinfo_property() {
        if (is_array($this->pluginsinfo)) {
            return;
        }
        $this->pluginsinfo = array();

        $plugintypes = $this->get_plugin_types();

        foreach ($plugintypes as $plugintype => $plugintyperootdir) {
            $this->pluginsinfo[$plugintype] = null;
        }

        // Add orphaned subplugin types.
        $this->load_installed_plugins();
        foreach ($this->installedplugins as $plugintype => $unused) {
            if (!isset($plugintypes[$plugintype])) {
                $this->pluginsinfo[$plugintype] = null;
            }
        }
    }
470879
public function init()
    {
        // Works only on frontend site
        if (OL_ZEUS_ISADMIN) {
            return;
        }

        // Check filepath
        if (empty($this->filepath)) {
            return;
        }

        // Get configurations
        $configs = include $this->filepath;

        // Check
        if (empty($configs) || in_array($GLOBALS['pagenow'], ['wp-login.php'])) {
            return;
        }

        // Enqueue scripts and styles
        add_action('wp_enqueue_scripts', function () use ($configs) {
            // Iterate on configs
            foreach ($configs as $key => $props) {
                $props = !is_array($props) && !is_bool($props) ? [$props] : $props;

                if ('scripts' === $key) {
                    // Enqueue scripts
                    $this->enqueueScripts($props);
                } else if ('styles' === $key) {
                    // Enqueue styles
                    $this->enqueueStyles($props);
                }
            }
        });
    }
971085
public function initialize() {
		Configure::write('Cache.disable', true);
		parent::initialize();

		if (!Configure::check('CakeInstaller')) {
			$this->ConfigInstaller->initConfig();
		}

		foreach ($this->_defaultConfigs['default'] as $paramName => &$paramOptions) {
			if (isset($paramOptions['label'])) {
				$paramOptions['label'] = __d('cake_installer_label', $paramOptions['label']);
			}
		}
	}
926404
def initialize_plugin(self):
        
        if not self.patterns:
            self.patterns = [
                re.compile(pattern_string)
                for pattern_string in self.PRERELEASE_PATTERNS
            ]
            logger.info(f"Initialized prerelease plugin with {self.patterns}")
9971
private function init()
    {
        foreach ($this->configs as $webmaster => $content) {
            $this->add($webmaster, $content);
        }
    }
1349558
void initialize() {
        // Cancel any running tasks
        Timer oldTimer = timer;
        timer = new Timer(true);
        if (Objects.nonNull(oldTimer)) {
            oldTimer.cancel();
        }
        // (re)initialize
        LoaderConfigurator configurator = new LoaderConfigurator(this);
        defaultLoaderServiceFacade = new DefaultLoaderServiceFacade(timer, listener, resources);
        configurator.load();
    }
1201250
protected function init() {
        if (isset($this->stores)) {
            // Do not bother checking readers and writers here
            // because everything is init here.
            return;
        }
        $this->stores = array();
        $this->readers = array();
        $this->writers = array();

        // Register shutdown handler - this may be useful for buffering, file handle closing, etc.
        \core_shutdown_manager::register_function(array($this, 'dispose'));

        $plugins = get_config('tool_log', 'enabled_stores');
        if (empty($plugins)) {
            return;
        }

        $plugins = explode(',', $plugins);
        foreach ($plugins as $plugin) {
            $classname = "\\$plugin\\log\\store";
            if (class_exists($classname)) {
                $store = new $classname($this);
                $this->stores[$plugin] = $store;
                if ($store instanceof \tool_log\log\writer) {
                    $this->writers[$plugin] = $store;
                }
                if ($store instanceof \core\log\reader) {
                    $this->readers[$plugin] = $store;
                }
            }
        }
    }
210566
def _initialize_plugin_system(self) -> None:
        """"""
        self._preloop_hooks = []
        self._postloop_hooks = []
        self._postparsing_hooks = []
        self._precmd_hooks = []
        self._postcmd_hooks = []
        self._cmdfinalization_hooks = []
389224
protected function initializeServices()
    {
        // Initiate registry, route, params, and set base route based on finding.
        $this->services['route'] = $this->finding->getRoute();

        $this->params = $this->finding->getParameters();

        $this->services['request'] = $this->finding->getRequest();
    }
943134
def initialize_plugin(self):
        
        # TODO: should retrieving the plugin's config be part of the base class?
        try:
            config = self.configuration["filter_regex"]["releases"]
        except KeyError:
            return
        else:
            if not self.patterns:
                pattern_strings = [pattern for pattern in config.split("\n") if pattern]
                self.patterns = [
                    re.compile(pattern_string) for pattern_string in pattern_strings
                ]

                logger.info(f"Initialized regex release plugin with {self.patterns}")
721276
private function init()
    {
        foreach ($this->get(Registry::class)->get('services', []) as $name => $definition) {
            $this->set($name, $definition);
        }
    }
1283277
def initialize_plugin(plugin, plugin_info, options = {})
      options = {
        :log => @log
      }.merge(options)

      unless @plugin_chain.empty?
        options.merge!(:previous_plugin => @plugin_chain.last[:plugin])
      end

      plugin.init(@config, @appliance_config, plugin_info, options)

      # Execute callbacks if implemented
      #
      # Order is very important
      [:after_init, :validate, :after_validate].each do |callback|
        plugin.send(callback) if plugin.respond_to?(callback)
      end

      param = nil

      # For operating system plugins we need to inject appliance definition.
      if plugin_info[:type] == :os
        param = @appliance_definition
      end

      @plugin_chain << {:plugin => plugin, :param => param}
    end
1300677
public function init()
    {
        // Check filepath
        if (empty($this->filepath)) {
            return;
        }

        // Get configurations
        $configs = include $this->filepath;

        // Check
        if (empty($configs)) {
            return;
        }

        // Iterate on configs
        foreach ($configs as $key => $description) {
            $this->addMenu($key, $description);
        }
    }
1111383
def _load(self, ):
        
        try:
            self.init()
        except Exception as e:
            log.exception("Load failed!")
            raise errors.PluginInitError('%s' % e)
        self.__status = self.__LOADED
792708
private static function init()
    {
        if (!self::$data_initialized) {
            self::$data_initialized = true;

            $page_components_collection = new PageComponentEntityRepository();
            $page_components_collection->setWherePageId(PAGE_ID);
            $page_components_collection->addWhereFieldIsLike('component', 'select_plugin');
            if (Settings::isCacheEnabled()) {
                $page_components_collection->enableUsingCache();
            }

            self::$data = $page_components_collection->getPairs('data', 'component');
        }
    }