Load plugin data
@return $this
164806
public function load()
	{
		if( $this->cacheType() === "data" )
		{
			$ref = new \ReflectionClass($this);
			$cache_name = Str::snake($ref->getShortName());
			$cache_data = $this->cacheData();

			if( isset($cache_data["id"]) )
			{
				$id = $cache_data["id"];
				unset($cache_data["id"]);
			}
			else
			{
				$id = $cache_data;
			}

			$cache = new Cache( $id, "plugin/" . $cache_name, $cache_data );
			if( $cache->ready() )
			{
				$this->plugin_data = $cache->import();
			}
			else
			{
				$this->loadPluginData();
				$cache->export($this->plugin_data);
			}
		}
		else
		{
			$this->loadPluginData();
		}

		return $this;
	}
92839
public function loadAllPlugins()
    {
        if (count($this->plugins) > 0) {
            foreach ($this->plugins as $plugin_name => $plugin) {
                $event_helpers = $plugin->getEventHelperCallbacks();
                if (count($event_helpers) > 0) {
                    foreach ($event_helpers as $event_name => $callback) {
                        if (!isset($this->events_helpers[$event_name])) {
                            $this->events_helpers[$event_name] = array();
                        }
                        $this->events_helpers[$event_name][] = $plugin; //add the plugin object to the map
                    }
                }
            }

            //register all event helpers
            if (count($this->events_helpers) > 0) {
                foreach ($this->events_helpers as $event_name => $plugin_objs) {
                    if (count($plugin_objs) > 0) {
                        $this->plugin_loading = true;
                        $this->on($event_name, function($event) use ($plugin_objs) {
                            return call_user_func_array(array($event, "register"), $plugin_objs)->start();
                        });
                        $this->plugin_loading = false;
                    }
                }
            }
        }
    }
430490
public function load()
  {
    $m = $this->getManager();
    if (!$pk = $this->getPrimaryKey()) {
      Exception::ThrowError(Exception::PK_NOT_SET, __CLASS__);
    }

    $q = $m->getQueryBuilder()
      ->select($this->getTable())
      ->where(array($pk => $this->get($pk)));

    $this->vars = $m->query($q)->fetch(\PDO::FETCH_ASSOC);

    return $this;
  }
921968
protected function setLoaded()
    {
        $this->loadedPkv = $this->getPkv();
        if($this->loadedPkv === null) {
            throw new \UnexpectedValueException('The data is not loaded.');
        }
        return $this;
    }
64162
public function set_plugin_data() {

		// Load plugin.php if get_plugins() not available
		if ( ! function_exists( 'get_plugins' ) ) {
			require_once ABSPATH . 'wp-admin/includes/plugin.php';
		}

		// Get path to plugin's directory
		$plugin_dir = plugin_basename( dirname( __FILE__ ) );

		// Get plugin data
		$plugin_data = current( get_plugins( '/' . $plugin_dir ) );

		// Set plugin data
		$this->plugin_data = apply_filters( 'ctc_plugin_data', $plugin_data );

	}
1317821
protected function load()
    {
        if ($this->loaded)
        {
            return;
        }

        $table = ORM::getTable(Eresus_Plugin_Registry::getInstance()->load('gallery'), 'Image');
        $q = $table->createSelectQuery();
        $e = $q->expr;

        $q->where(
            $e->lAnd(
                $e->eq('section', $q->bindValue($this->sectionId, null, PDO::PARAM_INT)),
                $e->eq('active', $q->bindValue(true, null, PDO::PARAM_BOOL)),
                $e->neq('groupId', 0)
            ))->
            orderBy('groupId');

        $this->items = $table->loadFromQuery($q);

        $this->loaded = true;
    }
712678
public function load()
    {
        if ($this->_configData === null) {
            $this->initScope();
            $this->_configData = $this->_getConfig(false);
        }

        return $this->_configData;
    }
797207
public function loadPlugins($plugins)
	{
		foreach($plugins as $plugin) {
			$pluginClass = str_replace(':','\\',$plugin);

			$this->plugins[] = new $pluginClass($this->core);
		}
	}
109345
public function loadPlugin(AbstractPlugin $plugin)
    {
        $name = $plugin->getName();
        $this->log->addDebug('--- Loading plugin ' . $name . PHP_EOL);

        $plugin->init();
        $this->plugins[$name] = $plugin;

        return $this;
    }
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;
                    }
                }
            }
        }
    }
38215
public function loadDefault() {
		foreach($this->getDefinition()->properties() as $name=>$property)
			$this->_set($name, $property->getDefault($this, $name), null, false);
		return $this;
	}
15641
public function loadPlugins($_) {
		$arguments = func_get_args();
		foreach ($arguments as $possiblePackage) {
			if (FALSE === is_array($possiblePackage)) {
				$this->plugins += $this->loadPluginsFromPackage($possiblePackage);
			} else {
				foreach ($possiblePackage as $package) {
					$this->plugins += $this->loadPluginsFromPackage($package);
				}
			}
		}
		return $this;
	}
378841
public function reload()
    {
        $this->data = (array)$this->db->select($this->table, array($this->primaryKey => $this->get($this->primaryKey)));
        $this->changedData = array();
        $this->isChanged = false;
        $this->triggerCallback('afterLoad');
        return $this;
    }
302013
public function load()
    {
        $settings = $this->getService('com:settings.setting');

        foreach($this->_attributes as $key => $value) {
          $this->_attributes[$key] = $settings->$key;
        }

        return $this;
    }
908684
private function load()
    {
        $data = [];
        $data = array_merge($this->params, $this->__get('parameters'));

        if (!file_exists($this->viewPath)) {
            throw new ViewNotFoundException('The view path '.$this->viewPath.' is invalid.');
        }

        $output = $this->output->renderView($this->viewPath, $data);
        $this['__content__'] = $output;

        return $this;
    }
795645
public function load_data() {
		$data = get_option( $this->store_key() );
		if ( empty( $data ) ) {
			$data = $this->get_data();
		}

		return $data;
	}
157688
protected function loadPlugins()
    {
        if (
            !defined('WP_PLUGIN_DIR') ||
            !defined('WPMU_PLUGIN_DIR') ||
            !is_blog_installed()
        ) {
            return;
        }

        $cache = get_site_option('wordplate_autoloader_plugin_cache');

        if ($cache !== false && isset($cache['files'])) {
            $cacheFiles = $cache['files'];

            foreach ($cacheFiles as $file) {
                // Check if plugin have been removed.
                if (!file_exists(WPMU_PLUGIN_DIR.'/'.$file)) {
                    $cache = false; // Invalidate cache.
                    break;
                }
            }
        } else {
            $cache = false; // Invalidate cache.
            $cacheFiles = [];
        }

        // Required for 'get_plugins' & 'get_mu_plugins' functions.
        require_once ABSPATH.'wp-admin/includes/plugin.php';

        $this->relativePath = UrlGenerator::getRelativePath(
            WP_PLUGIN_DIR.'/',
            WPMU_PLUGIN_DIR.'/'
        );

        $this->autoloadPlugins = get_plugins('/'.$this->relativePath);
        $this->mustUsePlugins = get_mu_plugins();

        // Remove duplicate plugins.
        $this->plugins = array_diff_key($this->autoloadPlugins, $this->mustUsePlugins);

        $this->files = array_keys($this->plugins);

        // Add relativePath before filename
        $this->relativeFiles = preg_filter('/^/', $this->relativePath, $this->files);

        $this->activate = array_diff($this->files, $cacheFiles);

        // Check if plugin have been added.
        if ($this->activate) {
            $cache = false; // Invalidate cache.
        }

        if ($cache === false) {
            // Update cache.
            update_site_option('wordplate_autoloader_plugin_cache', [
                'files' => $this->files,
            ]);
        }

        // Load already activated plugins
        $activated = array_diff($this->files, $this->activate);
        foreach ($activated as $file) {
            include_once WPMU_PLUGIN_DIR.'/'.$file;
        }

        add_action('after_setup_theme', function () {
            $this->activatePlugins();
        });
    }