Scans each plugin an loads it's components.
@return void
436031
protected function loadComponents()
    {
        /*
         * Load module components
         */
        foreach ($this->callbacks as $callback) {
            $callback($this);
        }

        /*
         * Load plugin components
         */
        $pluginManager = PluginManager::instance();
        $plugins = $pluginManager->getPlugins();

        foreach ($plugins as $plugin) {
            $components = $plugin->registerComponents();
            if (!is_array($components)) {
                continue;
            }

            foreach ($components as $className => $code) {
                $this->registerComponent($className, $code, $plugin);
            }
        }
    }
454739
function load() {
			$all_plugins_data = $this->get_all_data();
			$this->_data      = isset( $all_plugins_data[ $this->_secondary_id ] ) ?
				$all_plugins_data[ $this->_secondary_id ] :
				array();
		}
632036
public function loadPlugins()
    {
        $this->plugins = [];

        /**
         * Locate all plugins and binds them to the container
         */
        foreach ($this->getPluginNamespaces() as $namespace => $path) {
            $this->loadPlugin($namespace, $path);
        }

        return $this->plugins;
    }
749357
public function index()
    {
        $query = $this->Extensions->find('search', $this->Extensions->filterParams($this->request->getQueryParams()));

        $this
            ->set('plugins', $this->paginate($query))
            ->set('page_title', __d('extensions', 'The list of available plugins'));
    }
1174114
private function load()
    {
        if (null === $this->collection) {
            $this->collection = $this->transformer->getChildren($this->page);
        }
    }
1134176
public function loadPluginConfiguration(): void
	{
		$builder = $this->getContainerBuilder();
		$global = $this->compiler->getExtension()->getConfig();
		$config = $this->getConfig();

		if ($config['tracy'] === true) {
			$builder->addDefinition($this->prefix('tracy'))
				->setFactory(TracyMiddleware::class . '::factory', [$global['debug']])
				->addTag(MiddlewaresExtension::MIDDLEWARE_TAG, ['priority' => 100]);
		}

		if ($config['autobasepath'] === true) {
			$builder->addDefinition($this->prefix('autobasepath'))
				->setFactory(AutoBasePathMiddleware::class)
				->addTag(MiddlewaresExtension::MIDDLEWARE_TAG, ['priority' => 200]);
		}

		$builder->addDefinition($this->prefix('api'))
			->setFactory(ApiMiddleware::class)
			->addTag(MiddlewaresExtension::MIDDLEWARE_TAG, ['priority' => 500]);
	}
582291
public function load() {

		do_action( 'pods_components_load' );

		foreach ( (array) $this->components as $component => $component_data ) {
			$component_id = $component_data['ID'];

			$component_data['MustUse'] = apply_filters( "pods_component_require_{$component_id}", $component_data['MustUse'], $component_data );

			if ( false === $component_data['MustUse'] && ( ! isset( $this->settings['components'][ $component ] ) || 0 === $this->settings['components'][ $component ] ) ) {
				continue;
			}

			if ( ! empty( $component_data['PluginDependency'] ) ) {
				$dependency = explode( '|', $component_data['PluginDependency'] );

				if ( ! pods_is_plugin_active( $dependency[1] ) ) {
					continue;
				}
			}

			if ( ! empty( $component_data['ThemeDependency'] ) ) {
				$dependency = explode( '|', $component_data['ThemeDependency'] );

				$check = strtolower( $dependency[1] );

				if ( strtolower( get_template() ) !== $check && strtolower( get_stylesheet() ) !== $check ) {
					continue;
				}
			}

			if ( false === $component_data['External'] ) {
				$component_data['File'] = realpath( $this->components_dir . $component_data['File'] );
			}

			if ( empty( $component_data['File'] ) ) {
				pods_transient_clear( 'pods_components' );

				continue;
			}

			if ( ! file_exists( $component_data['File'] ) ) {
				pods_message( 'Pods Component not found: ' . $component_data['File'] );

				pods_transient_clear( 'pods_components' );

				continue;
			}

			include_once $component_data['File'];

			if ( ( ! empty( $component_data['Class'] ) && class_exists( $component_data['Class'] ) ) || isset( $component_data['object'] ) ) {
				if ( ! isset( $this->components[ $component ]['object'] ) ) {
					$this->components[ $component ]['object'] = new $component_data['Class']();
				}

				if ( method_exists( $this->components[ $component ]['object'], 'options' ) ) {
					if ( isset( $this->settings['components'][ $component ] ) ) {
						$this->components[ $component ]['options'] = $this->components[ $component ]['object']->options( $this->settings['components'][ $component ] );
					} else {
						$this->components[ $component ]['options'] = $this->components[ $component ]['object']->options( array() );
					}

					$this->options( $component, $this->components[ $component ]['options'] );
				} else {
					$this->options( $component, array() );
				}

				if ( method_exists( $this->components[ $component ]['object'], 'handler' ) ) {
					$this->components[ $component ]['object']->handler( $this->settings['components'][ $component ] );
				}
			}//end if
		}//end foreach
	}
696225
public function loadConfigurations(): void
	{
		foreach ($this->plugins as $plugin) {
			$plugin['inst']->setupPlugin($plugin['config']);
			$plugin['inst']->loadPluginConfiguration();
		}
	}
1025314
public function loadPlugins()
    {
        $nameSpace = apply_filters('Municipio/Admin/TinyMce/LoadPlugins', "\Municipio\Admin\TinyMce");
        if (isset($nameSpace) && !empty($nameSpace)) {

            $plugins = (array) get_field('content_editor_plugins', 'options');

            if (is_array($plugins) && !empty($plugins)) {
                foreach ($plugins as $plugin) {
                    $pluginClass = $nameSpace . "\\" . $plugin . "\\" . $plugin;
                    if (class_exists($pluginClass)) {
                        new $pluginClass;
                    }
                }
            }
        }
    }
1284962
public function scanSourceFolders() {
        $this->addons = [];
        foreach ($this->sources as $sourceDir) {
            $this->scanSource($sourceDir);
        }
    }
1002136
private void loadPreInstalledPlugins() {
    for (File file : listJarFiles(fs.getInstalledPluginsDir())) {
      PluginInfo info = PluginInfo.create(file);
      registerPluginInfo(info);
    }
  }
1091975
private function analyze()
	{
		// Check if we have component, module, plugin etc.
		if (!file_exists($this->getSourceFolder() . "/administrator/components/com_" . $this->getExtensionName())
			&& !file_exists($this->getSourceFolder() . "/components/com_" . $this->getExtensionName()))
		{
			$this->say("Extension has no component");
			$this->hasComponent = false;
		}

		if (!file_exists($this->getSourceFolder() . "/modules"))
		{
			$this->hasModules = false;
		}

		if (!file_exists($this->getSourceFolder() . "/plugins"))
		{
			$this->hasPlugins = false;
		}

		if (!file_exists($this->getSourceFolder() . "/templates"))
		{
			$this->hasTemplates = false;
		}

		if (!file_exists($this->getSourceFolder() . "/libraries"))
		{
			$this->hasLibraries = false;
		}

		if (!file_exists($this->getSourceFolder() . "/administrator/manifests/packages"))
		{
			$this->hasPackage = false;
		}

		if (!file_exists($this->getSourceFolder() . "/components/com_comprofiler"))
		{
			$this->hasCBPlugins = false;
		}
	}
1118428
protected function scanPackages()
    {
        $rootPackage = $this->composer->getPackage();
        if ($rootPackage) {
            $extra = $rootPackage->getExtra();
            foreach ($this->managers as $manager) {
                $var = $manager->getName() . '-asset-library';
                if (isset($extra['asset-installer-paths'][$var])) {
                    $manager->setDestination($extra['asset-installer-paths'][$var]);
                }
            }
        }
        foreach ($this->getPackages() as $package) {
            if ($package instanceof \Composer\Package\CompletePackageInterface) {
                $this->scanAssetDependencies($package);
            }
        }
        foreach ($this->getPackages() as $package) {
            if ($package instanceof \Composer\Package\CompletePackageInterface) {
                foreach ($this->managers as $manager) {
                    $manager->scanPackage($package);
                }
            }
        }
    }
1329813
protected function initialize() {
		$this->plugin_name = $this->app->plugin_name;
		$this->plugin_file = $this->app->plugin_file;

		$this->plugin_namespace = ucwords( $this->plugin_name, '_' );
		$this->plugin_dir       = dirname( $this->plugin_file );
		$this->plugin_dir_name  = basename( $this->plugin_dir );
		$this->plugin_base_name = $this->app->is_theme ? 'theme/' . $this->plugin_dir : plugin_basename( $this->plugin_file );

		$cache = $this->app->get_shared_object( 'lib_defines_cache', 'all' );
		if ( ! isset( $cache ) ) {
			$cache                           = [];
			$cache['lib_name']               = TECHNOTE_PLUGIN;
			$cache['lib_dir']                = $this->app->get_library_directory();
			$cache['lib_namespace']          = ucfirst( $cache['lib_name'] );
			$cache['lib_assets_dir']         = $cache['lib_dir'] . DS . 'assets';
			$cache['lib_src_dir']            = $cache['lib_dir'] . DS . 'src';
			$cache['lib_configs_dir']        = $cache['lib_dir'] . DS . 'configs';
			$cache['lib_views_dir']          = $cache['lib_src_dir'] . DS . 'views';
			$cache['lib_textdomain']         = TECHNOTE_PLUGIN;
			$cache['lib_languages_dir']      = $cache['lib_dir'] . DS . 'languages';
			$cache['lib_languages_rel_path'] = ltrim( str_replace( WP_PLUGIN_DIR, '', $cache['lib_languages_dir'] ), DS );
			$cache['lib_vendor_dir']         = $cache['lib_dir'] . DS . 'vendor';
			$cache['lib_assets_url']         = plugins_url( 'assets', $cache['lib_assets_dir'] );
			$this->app->set_shared_object( 'lib_defines_cache', $cache, 'all' );
		}
		foreach ( $cache as $k => $v ) {
			$this->$k = $v;
		}

		$this->plugin_assets_dir  = $this->plugin_dir . DS . 'assets';
		$this->plugin_src_dir     = $this->plugin_dir . DS . 'src';
		$this->plugin_configs_dir = $this->plugin_dir . DS . 'configs';
		$this->plugin_views_dir   = $this->plugin_src_dir . DS . 'views';
		$domain_path              = trim( $this->app->get_plugin_data( 'DomainPath' ), '/' . DS );
		if ( empty( $domain_path ) || ! is_dir( $this->plugin_dir . DS . $domain_path ) ) {
			$this->plugin_textdomain         = false;
			$this->plugin_languages_dir      = false;
			$this->plugin_languages_rel_path = false;
		} else {
			$this->plugin_textdomain         = $this->app->get_plugin_data( 'TextDomain' );
			$this->plugin_languages_dir      = $this->plugin_dir . DS . $domain_path;
			$this->plugin_languages_rel_path = ltrim( str_replace( WP_PLUGIN_DIR, '', $this->plugin_languages_dir ), DS );
		}
		$this->plugin_logs_dir = $this->plugin_dir . DS . 'logs';

		if ( $this->app->is_theme ) {
			$this->plugin_url = get_template_directory_uri();
			if ( get_template_directory() !== get_stylesheet_directory() ) {
				$this->child_theme_dir        = get_stylesheet_directory();
				$this->child_theme_url        = get_stylesheet_directory_uri();
				$this->child_theme_assets_dir = $this->child_theme_dir . DS . 'assets';
				$this->child_theme_assets_url = $this->child_theme_url . '/assets';
			}
		} else {
			$this->plugin_url = plugins_url( '', $this->plugin_file );
		}
		$this->plugin_assets_url = $this->plugin_url . '/assets';
	}
930304
public void load() {
        Stopwatchs.start("Load Plugins");

        classLoaders.clear();

        final ServletContext servletContext = AbstractServletListener.getServletContext();
        final Set<String> pluginDirPaths = servletContext.getResourcePaths("/plugins");

        final List<AbstractPlugin> plugins = new ArrayList<>();

        if (null != pluginDirPaths) {
            for (final String pluginDirPath : pluginDirPaths) {
                try {
                    LOGGER.log(Level.INFO, "Loading plugin under directory[{0}]", pluginDirPath);

                    final AbstractPlugin plugin = load(pluginDirPath, pluginCache);

                    if (plugin != null) {
                        plugins.add(plugin);
                    }
                } catch (final Exception e) {
                    LOGGER.log(Level.WARN, "Load plugin under directory[" + pluginDirPath + "] failed", e);
                }
            }
        }

        eventManager.fireEventSynchronously(new Event<>(PLUGIN_LOADED_EVENT, plugins));

        Stopwatchs.end();
    }
543751
public function action_plugins_loaded() {
		// User Switching's auth_cookie
		if ( ! defined( 'USER_SWITCHING_COOKIE' ) ) {
			define( 'USER_SWITCHING_COOKIE', 'wordpress_user_sw_' . COOKIEHASH );
		}

		// User Switching's secure_auth_cookie
		if ( ! defined( 'USER_SWITCHING_SECURE_COOKIE' ) ) {
			define( 'USER_SWITCHING_SECURE_COOKIE', 'wordpress_user_sw_secure_' . COOKIEHASH );
		}

		// User Switching's logged_in_cookie
		if ( ! defined( 'USER_SWITCHING_OLDUSER_COOKIE' ) ) {
			define( 'USER_SWITCHING_OLDUSER_COOKIE', 'wordpress_user_sw_olduser_' . COOKIEHASH );
		}
	}
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;
            }
        }
    }