load up all data required for this export.

@return void
188289
public function load_data() {
        global $DB;
        if (!$this->cm = get_coursemodule_from_id('glossary', $this->id)) {
            throw new portfolio_caller_exception('invalidid', 'glossary');
        }
        if (!$this->glossary = $DB->get_record('glossary', array('id' => $this->cm->instance))) {
            throw new portfolio_caller_exception('invalidid', 'glossary');
        }
        $entries = $DB->get_records('glossary_entries', array('glossaryid' => $this->glossary->id));
        list($where, $params) = $DB->get_in_or_equal(array_keys($entries));

        $aliases = $DB->get_records_select('glossary_alias', 'entryid ' . $where, $params);
        $categoryentries = $DB->get_records_sql('SELECT ec.entryid, c.name FROM {glossary_entries_categories} ec
            JOIN {glossary_categories} c
            ON c.id = ec.categoryid
            WHERE ec.entryid ' . $where, $params);

        $this->exportdata = array('entries' => $entries, 'aliases' => $aliases, 'categoryentries' => $categoryentries);
        $fs = get_file_storage();
        $context = context_module::instance($this->cm->id);
        $this->multifiles = array();
        foreach (array_keys($entries) as $entry) {
            $this->keyedfiles[$entry] = array_merge(
                $fs->get_area_files($context->id, 'mod_glossary', 'attachment', $entry, "timemodified", false),
                $fs->get_area_files($context->id, 'mod_glossary', 'entry', $entry, "timemodified", false)
            );
            $this->multifiles = array_merge($this->multifiles, $this->keyedfiles[$entry]);
        }
    }
726599
protected function loadFormData()
    {
        if (! $this->formData) {
            parent::loadFormData();

            $model     = $this->getModel();
            $roles     = $model->get('ggp_role', 'multiOptions');
            $userRoles = $this->currentUser->getAllowedRoles();

            // \MUtil_Echo::track($userRoles, $roles);
            // Make sure we get the roles as they are labeled
            foreach ($roles as $role => $label) {
                if (! isset($userRoles[$role])) {
                    unset($roles[$role]);
                }
            }

            if ($this->formData['ggp_role'] && (! isset($roles[$this->formData['ggp_role']]))) {
                if ($this->createData) {
                    $this->formData['ggp_role'] = reset($roles);
                } else {
                    $this->addMessage($this->_('You do not have sufficient privilege to edit this group.'));
                    $this->afterSaveRouteUrl = array($this->request->getActionKey() => 'show');
                    $this->resetRoute        = false;
                    return;
                }
            }
            $model->set('ggp_role', 'multiOptions', $roles);

            $this->menu->getParameterSource()->offsetSet('ggp_role', $this->formData['ggp_role']);
        }
    }
923438
private function loadConfiguration()
    {
        $allFiles = File::allFiles('_automate');

        foreach ( $allFiles as $file )
            if( strpos((string)$file, '.done') === false )
                $this->configurationData[] = $this->optimizeData($file);

    }
592875
public static function loadAll()
    {
        global $taxonomies_infos;
        
        // Classes
        $subclasses = self::getSubclasses();
        foreach ($subclasses as $class) {
            $instance = new $class;
            $taxonomies_infos = array_merge(
                $taxonomies_infos,
                $instance->getTaxonomiesInfo()
            );
            
            self::load($class);
        }
    }
472822
protected function autoload()
    {
        if ($this->loaded) {
            return;
        }

        $table = Common::prefixTable('option');
        $sql   = 'SELECT option_value, option_name FROM `' . $table . '` WHERE autoload = 1';
        $all   = Db::fetchAll($sql);

        foreach ($all as $option) {
            $this->all[$option['option_name']] = $option['option_value'];
        }

        $this->loaded = true;
    }
1078793
protected function loadQuery()
    {
        if( !isset( $this->session[ $this->saveID ] ) ) {
            return;
        }
        $saved        = $this->session[ $this->saveID ];
        $this->inputs = array_merge( $saved[ 'inputs' ], $this->inputs );
        $this->perPage = $saved[ 'perPage' ];
        if( $currPage=$this->getKey($this->pager) ) {
            $this->currPage = $currPage;
        } else{
            $this->currPage = $saved['currPage'];
        }
    }
779898
public function loadConfiguration(): void
	{
		$this->validateConfig($this->defaults);
		$builder = $this->getContainerBuilder();

		$builder->addDefinition($this->prefix('parsedown'))
			->setFactory(ParsedownExtraAdapter::class);
	}
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;
    }
1108156
public function load()
    {
        foreach ($this->definitions as $tag => $definition) {
            $this->extendContainer($tag, $definition);
        }
    }
61853
public function load()
	{
		$this->clearAll();

		$items=$this->loadFromFile($this->authFile);

		foreach($items as $name=>$item)
			$this->_items[$name]=new CAuthItem($this,$name,$item['type'],$item['description'],$item['bizRule'],$item['data']);

		foreach($items as $name=>$item)
		{
			if(isset($item['children']))
			{
				foreach($item['children'] as $childName)
				{
					if(isset($this->_items[$childName]))
						$this->_children[$name][$childName]=$this->_items[$childName];
				}
			}
			if(isset($item['assignments']))
			{
				foreach($item['assignments'] as $userId=>$assignment)
				{
					$this->_assignments[$userId][$name]=new CAuthAssignment($this,$name,$userId,$assignment['bizRule'],$assignment['data']);
				}
			}
		}
	}
1061100
protected function load()
    {
        $data = file_get_contents($this->filename);
        // Ok, here comes the dirty work.
        // We take everything at the beginning of the file until the closing of the first doc comment.
        preg_match('#^(.+\*/)#sU', $data, $matches);

        if ($matches && count($matches[0])) {
            $this->head = $matches[0];
            if (preg_match(
                '#https://www.transifex.com/projects/p/(.*)/language/(.*)/#',
                $this->head,
                $match,
                PREG_OFFSET_CAPTURE
            )) {
                $this->transifexProject = $match[1][0][0];
                $this->language         = $match[2][0][0];
            }
        } else {
            $this->head = $this->getDefaultHead();
        }
        $this->langstrings = array();

        $parser = new Parser($this);
        $parser->setContent($data);
        $parser->parse();
    }
86961
protected function fillDataForEmpty()
    {
        // Fill export columns if they are empty
        $columns = [];

        $foreignKeys = $this->collectForeignKeys();

        // Add columns for attributes
        foreach ($this->info->attributes as $attribute) {

            if ($attribute->hidden || in_array($attribute->name, $foreignKeys)) {
                continue;
            }

            $columns[ $attribute->name ] = $this->makeModelExportColumnDataForAttributeData($attribute);
        }

        $this->info->export->columns = $columns;
    }
66760
public function load()
	{
		if (!$infile = $this->arguments->getOpt(3))
		{
			$this->output->error('Please provide an input file');
		}
		else
		{
			if (!is_file($infile))
			{
				$this->output->error("'{$infile}' does not appear to be a valid file");
			}
		}

		// First, set some things aside that we need to reapply after the update
		$params                           = [];
		$params['com_system']             = \Component::params('com_system');
		$params['com_tools']              = \Component::params('com_tools');
		$params['com_usage']              = \Component::params('com_usage');
		$params['com_users']              = \Component::params('com_users');
		$params['plg_projects_databases'] = \Plugin::params('projects', 'databases');

		$tables = App::get('db')->getTableList();

		// See if we should drop all tables first
		if ($this->arguments->getOpt('drop-all-tables'))
		{
			$this->output->addLine('Dropping all tables...');
			foreach ($tables as $table)
			{
				App::get('db')->dropTable($table);
			}
		}

		// Craft the command to be executed
		$infile = escapeshellarg($infile);
		$cmd    = "mysql -u " . Config::get('user') . " -p'" . Config::get('password') . "' -D " . Config::get('db') . " < {$infile}";

		$this->output->addLine('Loading data from ' . $infile . '...');

		// Now push the big red button
		exec($cmd);

		$migration = new Migration(App::get('db'));

		// Now load some things back up
		foreach ($params as $k => $v)
		{
			if (!empty($v))
			{
				$migration->saveParams($k, $v);
			}
		}

		$this->output->addLine('Load complete!', 'success');
	}
693023
private function Load()
	{
		$sql = "show tables";
		$rs = $this->Server->Connection->Select($sql);
		
		// first pass load all the tables.  this will initialize each object.  we have to
		// do this first so that we can correctly determine and store "Set" information
		while ($row = $this->Server->Connection->Next($rs))
		{
			$this->Tables[$row["Tables_in_" . $this->Name]] = new DBTable($this,$row);
		}
		
		// now load all the keys and constraints for each table
		foreach ($this->Tables as $table)
		{
			$table->LoadKeys();
		}

		$this->Server->Connection->Release($rs);
		
		$sql = "show table status from `" . $this->Name . "`";
		$rs2 = $this->Server->Connection->Select($sql);
		
		// load the extra data
		while ($row = $this->Server->Connection->Next($rs2))
		{
			$this->Tables[$row["Name"]]->Engine = $row["Engine"]; 
			$this->Tables[$row["Name"]]->Comment = $row["Comment"];
		}
		$this->Server->Connection->Release($rs2);
	}
197159
protected function load()
    {
        if (!$this->isConfigurationLoaded) {
            $this->values = $this->getDefaults();
            $values = $this->getConfigStore()->load();
            if (is_array($values)) {
                $this->values = array_merge($this->getDefaults(), $values);
            }
            $this->values = $this->castValues($this->values);
            $this->isConfigurationLoaded = true;
        }
    }
249751
protected function load()
    {
        if (!isset($_SESSION[$this->name])) {
            $_SESSION[$this->name] = [];
        }

        if (!isset($_SESSION[Session::FLASH_NOW][$this->name])) {
            $_SESSION[Session::FLASH_NOW][$this->name] = [];
        }

        if (!isset($_SESSION[Session::FLASH_NEXT][$this->name])) {
            $_SESSION[Session::FLASH_NEXT][$this->name] = [];
        }
    }
1233096
private function load()
    {
        $decoder = new JsonDecoder();
        $decoder->setObjectDecoding(JsonDecoder::ASSOC_ARRAY);

        $this->json = file_exists($this->path)
            ? $decoder->decodeFile($this->path)
            : array();

        if (!isset($this->json['keysByTypeName'])) {
            $this->json['keysByTypeName'] = array();
            $this->json['typesByKey'] = array();
            $this->json['bindingsByKey'] = array();
            $this->json['nextKey'] = 0;
        }
    }