doing all tasks to get the required informations that the plugin needs
result is stored in an internal array

@return void
420916
public function execute()
    {
        if (PSI_OS == 'WINNT') {
            try {
                $objLocator = new COM('WbemScripting.SWbemLocator');
                $wmi = $objLocator->ConnectServer('', 'root\StableBit\Scanner');
                $this->_result = CommonFunctions::getWMI($wmi, 'Disks', $this->stablebit_items);
            } catch (Exception $e) {
            }
        }
    }
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;
            }
        }
    }
225471
public function loadResult()
	{
		$this->connect();

		$ret = null;

		// Execute the query and get the result set cursor.
		if (!($cursor = $this->execute()))
		{
			return null;
		}

		// Get the first row from the result set as an array.
		$row = $this->fetchArray($cursor);

		if ($row)
		{
			$ret = $row[0];
		}

		// Free up system resources and return.
		$this->freeResult($cursor);

		return $ret;
	}
83028
final protected function _loadData()
    {
        if (!$this->isLoaded()) {
            $this->_object_set = new ArrayObject();
            foreach ($this->_getData() as $object) {
                $this->insert($object);
            }
        }
    }
815070
public function get_results() {
        if (!is_null($this->plan)) {
            return $this->plan->get_results();
        } else {
            debugging('Attempting to get results of a task not binded with a plan', DEBUG_DEVELOPER);
            return null;
        }
    }
995029
public static function update()
	{
		$results = array();

		$db = Factory::getDBO();

		/***
		 * UPGRADES FOR 1.1.0 Patch 2
		 ***/
		//see if the columns exists
		$query = 'SHOW COLUMNS FROM #__jfusion';
		$db->setQuery($query);
		$columns = $db->loadColumn();

		/**
		 * for 2.0
		 */
		$query = 'ALTER TABLE #__jfusion_sync_details CHANGE  `message`  `message` TEXT';
		$db->setQuery($query);
		$db->execute();

		$query = 'SHOW COLUMNS FROM #__jfusion';
		$db->setQuery($query);
		$columns = $db->loadColumn();

		//remove the plugin_files if it exists
		if (in_array('plugin_files', $columns)) {
			//remove the column
			$query = 'ALTER TABLE #__jfusion DROP column plugin_files';
			$db->setQuery($query);
			$db->execute();
		}

		// let's update to json
		$query = $db->getQuery(true)
			->select('params, id')
			->from('#__jfusion');

		$db->setQuery($query);
		$rows = $db->loadObjectList();
		if(!empty($rows)) {
			foreach ($rows as $row) {
				if ($row->params) {
					$params = base64_decode($row->params);
					if (strpos($params, 'a:') === 0) {
						ob_start();
						$params = unserialize($params);
						ob_end_clean();
						if (is_array($params)) {
							$params = new Registry($params);
							$row->params  = $params->toString();
							$db->updateObject('#__jfusion', $row, 'id');
						}
					}
				}
			}
		}

		/**
		 * 3.0
		 */
		//remove the plugin_files if it exists
		if (in_array('master', $columns)) {
			//remove master
			$query = 'ALTER TABLE #__jfusion DROP column master';
			$db->setQuery($query);
			$db->execute();
			//remove slave
			$query = 'ALTER TABLE #__jfusion DROP column slave';
			$db->setQuery($query);
			$db->execute();
			//remove search
			$query = 'ALTER TABLE #__jfusion DROP column search';
			$db->setQuery($query);
			$db->execute();
			//remove discussion
			$query = 'ALTER TABLE #__jfusion DROP column discussion';
			$db->setQuery($query);
			$db->execute();
		}

		//add a active column for user sync
		$query = 'SHOW COLUMNS FROM #__jfusion_sync';
		$db->setQuery($query);
		$columns = $db->loadColumn();
		if (!in_array('type', $columns)) {
			$query = 'ALTER TABLE #__jfusion_sync
					ADD COLUMN `type` VARCHAR(50) DEFAULT NULL';
			$db->setQuery($query);
			$db->execute();
		}

		//cleanup unused plugins
		$query = $db->getQuery(true)
			->select('name')
			->from('#__jfusion')
			->where('(params IS NULL OR params = ' . $db->quote('') . ' OR params = ' . $db->quote('0') . ')')
			->where('status = 0');

		$db->setQuery($query);
		$rows = $db->loadObjectList();
		if(!empty($rows)) {
			foreach ($rows as $row) {
				$query = $db->getQuery(true)
					->select('count(*)')
					->from('#__jfusion')
					->where('original_name LIKE ' . $db->quote($row->name));

				$db->setQuery($query);
				$copys = $db->loadResult();
				if (!$copys) {
					$model = new Plugin();
					$model->uninstall($row->name);
				}
			}
		}
		return true;
	}
918820
protected function _populate() {
		if ($this->closed() || !$this->_result->valid()) {
			return;
		}
		$data = $this->_result->current();
		$result = $this->_set($data, null, ['exists' => true, 'original' => true]);
		$this->_result->next();

		return $result;
	}
345587
private function _initialize()
    {
        if ($this->getInitialized()) {
            return;
        }

        $params = $this->getParameters();
        if ($params !== null) {
            foreach ($params as $param) {
                if ('in' == $param->getName()) {
                    $this->setInputEncoding($param->getValue());
                } else {
                    if ('out' == $param->getName()) {
                        $this->setOutputEncoding($param->getValue());
                    }
                }
            }
        }

        $this->setInitialized(true);
    }
254788
public function renderResults()
    {
        if (!$this->results && $this->query) {
            $this->performSearch();
        }

        if (!$this->outputController) {
            return user_error('Call renderResults() on a DocumentationViewer instance.', E_USER_ERROR);
        }
        
        $request = $this->outputController->getRequest();
        $data = $this->getSearchResults($request);
        $templates = array('DocumentationViewer_search');

        if ($request->requestVar('format') && $request->requestVar('format') == "atom") {
            // alter the fields for the opensearch xml.
            $title = ($title = $this->getTitle()) ? ' - '. $title : "";
            
            $link = Controller::join_links(
                $this->outputController->Link(),
                'DocumentationOpenSearchController/description/'
            );
            
            $data->setField('Title', $data->Title . $title);
            $data->setField('DescriptionURL', $link);
            
            array_unshift($templates, 'OpenSearchResults');
        }
        
        return $this->outputController->customise($data)->renderWith($templates);
    }
1356163
public function loadRegisteredTemplates()
    {
        foreach ($this->callbacks as $callback) {
            $callback($this);
        }

        $plugins = PluginManager::instance()->getPlugins();
        foreach ($plugins as $pluginId => $pluginObj) {
            $layouts = $pluginObj->registerMailLayouts();
            if (is_array($layouts)) {
                $this->registerMailLayouts($layouts);
            }

            $templates = $pluginObj->registerMailTemplates();
            if (is_array($templates)) {
                $this->registerMailTemplates($templates);
            }

            $partials = $pluginObj->registerMailPartials();
            if (is_array($partials)) {
                $this->registerMailPartials($partials);
            }
        }
    }
1032044
public function init() {
		if ( ! function_exists( 'get_plugin_data' ) ) {
			require_once ABSPATH . 'wp-admin/includes/plugin.php';
		}
		$this->plugin_data = get_plugin_data( $this->plugin_file, false, false );
	}
1046246
protected function getAddOnResults() {
        if (!$this->_addOnResults) {
            $this->_addOnResults = new AddOnResultList(
                $this->version,
                $this->solution['accountSid'],
                $this->solution['sid']
            );
        }

        return $this->_addOnResults;
    }
447905
protected function initialize() {
		if ( ! function_exists( 'get_plugin_data' ) ) {
			require_once ABSPATH . 'wp-admin/includes/plugin.php';
		}
		$this->_plugin_data = $this->app->is_theme ? wp_get_theme() : get_plugin_data( $this->app->plugin_file, false, false );
	}
263610
public function index() {
        $plugins = Admin::getModels();
        $counts = array();

        // Gather record counts
        foreach ($plugins as $plugin) {
            foreach ($plugin['models'] as $model) {
                if ($model['installed']) {
                    $object = Admin::introspectModel($model['class']);

                    if ($object->hasMethod('getCount')) {
                        $count = $object->getCount();
                    } else {
                        $count = $object->find('count', array(
                            'cache' => array($model['class'], 'count'),
                            'cacheExpires' => '+24 hours'
                        ));
                    }

                    $counts[$model['class']] = $count;
                }
            }
        }

        $this->set('plugins', $plugins);
        $this->set('counts', $counts);
    }
143135
public function getResults()
    {
        if (is_null($this->_resultsCache)) {
            $this->_resultsCache = call_user_func($this->getMapper());

            if ($this->prefetchRelatedLookups && !$this->_prefetchRelatedDone) {
                $this->_prefetchRelatedObjects();
            }
        }

        return $this->_resultsCache;
    }
812526
protected function bind()
    {
        $variables = array();

        // Bind each field
        while ($field = $this->metadata->fetch_field()) {
            $this->columns[] = $field->name;
            $this->types[$field->name] = $field->type;
            // Note that while boundValues isn't initialised at this point,
            // later calls to $this->statement->fetch() Will populate
            // $this->boundValues later with the next result.
            $variables[] = &$this->boundValues[$field->name];
        }

        $this->bound = true;
        $this->metadata->free();

        // Buffer all results
        $this->statement->store_result();

        call_user_func_array(array($this->statement, 'bind_result'), $variables);
    }
686441
protected function executeInternal()
    {
        $formRuntime = $this->finisherContext->getFormRuntime();
        $formValues = json_encode($formRuntime->getFormState()->getFormValues());
        $formIdentifier = $formRuntime->getFormDefinition()->getIdentifier();
        $accountIdentifier = $this->getAccountIdentifier();
        $formData = new FormData($formIdentifier, $accountIdentifier, $formValues);
        foreach ($this->defaultOptions as $option => $value) {
            $value = $this->parseOption($option);
            if ($value === false) {
                continue;
            }
            switch ($option) {
                case 'db':
                    $this->formDataRepository->add($formData);
                    break;
                case 'elasticSearch':
                    $properties = array();
                    $elements = $formRuntime->getFormDefinition()->getRenderablesRecursively();
                    foreach ($elements as $element) {
                        if (!$element instanceof FormElementInterface) {
                            continue;
                        }
                        $properties[$element->getIdentifier()] = $element->getProperties();
                    }
                    $this->elasticSearchService->index($formData, $properties);
            }
        }
    }