This function will load one entire XMLDB file and call install_from_xmldb_structure.

@param string $file full path to the XML file to be used
@return void
545873
public function install_from_xmldb_file($file) {
        $xmldb_file = $this->load_xmldb_file($file);
        $xmldb_structure = $xmldb_file->getStructure();
        $this->install_from_xmldb_structure($xmldb_structure);
    }
1117392
public function import($file)
    {
        $rules = $this->yaml->load($file);

        foreach ($rules as $rule) {
            list($key, $value) = each($rule);
            switch ($key) {
                case 'root':
                    $this->setRoot($value);
                    break;
                case 'match':
                    $this->addMatchRule($value);
                    break;
            }
        }
    }
1164404
public function load($file)
    {
        if (!is_string($file) || !file_exists($file)) {
            throw new InvalidArgumentException('File must be a valid file.');
        }

        $data = include $file;

        if (!is_array($data)) {
            throw new RuntimeException('File did not return an array.');
        }

        return $this->set($data);
    }
172138
public function install(?string $database, $id = null): void
    {
        if (! \is_null($id)) {
            $this->executeFor($id, function ($entity) use ($database) {
                $this->runInstall($entity, $database);
            });

            return;
        }

        $this->executeForEach(function ($entity) use ($database) {
            $this->runInstall($entity, $database);
        });
    }
1021460
public function _Import($file)
    {
        if ($this->path_lib===null) {
            $this->path_lib=$this->path.rtrim($this->options['path_lib'], '/').'/';
        }
        $file=rtrim($file, '.php').'.php';
        require_once($this->path_lib.$file);
    }
1045468
public function install_from_xmldb_structure($xmldb_structure) {

        if (!$sqlarr = $this->generator->getCreateStructureSQL($xmldb_structure)) {
            return; // nothing to do
        }

        $tablenames = array();
        foreach ($xmldb_structure as $xmldb_table) {
            if ($xmldb_table instanceof xmldb_table) {
                $tablenames[] = $xmldb_table->getName();
            }
        }
        $this->execute_sql_arr($sqlarr, $tablenames);
    }
12917
public function load($file)
    {
        $file_name = $this->_config_path.$file.'.php';

        // load the file, but only once
        if (is_file($file_name) and ! array_key_exists($file, $this->_loaded)) {
            // the config file values are secondary to the config values that have already been set
            $this->_config = array_merge(require $file_name, $this->_config);

            $this->_loaded[$file] = true;

            return true;
        } elseif (! is_file($file_name)) {
            throw new \QuickCacheException('The config file "'.$file.'" does not exist');
        }
    }
221395
public function add_stored_file($file) {
        if (is_numeric($file)) {
            $this->files[$file] = $file;
        } else {
            $this->files[$file->get_id()] = $file;
        }
    }
1222096
protected function loadStrings(string $language, string $file): void
	{
		if($this->cache !== null)
		{
			if($this->loadFromCache($language, $file))
			{
				return;
			}

			$this->rebuildCache = true;
		}

		$this->strings[$language][$file] = $this->loader->loadStrings($language, $file);
	}
1366732
public function delete_tables_from_xmldb_file($file) {

        $xmldb_file = new xmldb_file($file);

        if (!$xmldb_file->fileExists()) {
            throw new ddl_exception('ddlxmlfileerror', null, 'File does not exist');
        }

        $loaded    = $xmldb_file->loadXMLStructure();
        $structure = $xmldb_file->getStructure();

        if (!$loaded || !$xmldb_file->isLoaded()) {
            // Show info about the error if we can find it
            if ($structure) {
                if ($errors = $structure->getAllErrors()) {
                    throw new ddl_exception('ddlxmlfileerror', null, 'Errors found in XMLDB file: '. implode (', ', $errors));
                }
            }
            throw new ddl_exception('ddlxmlfileerror', null, 'not loaded??');
        }

        if ($xmldb_tables = $structure->getTables()) {
            // Delete in opposite order, this should help with foreign keys in the future.
            $xmldb_tables = array_reverse($xmldb_tables);
            foreach($xmldb_tables as $table) {
                if ($this->table_exists($table)) {
                    $this->drop_table($table);
                }
            }
        }
    }
895781
public function loadFile($file)
    {
        $xml = file_get_contents($file);
        if (!$xml) {
            return false;
        }

        try {
            $this->setXml($xml);
        } catch (\Exception $e) {
            return false;
        }

        return true;
    }
948036
public function load($file)
    {
        $loader = new PhpConfig();
        $templates = $loader->read($file);
        $this->add($templates);
    }
618744
private function load_xmldb_file($file) {
        $xmldb_file = new xmldb_file($file);

        if (!$xmldb_file->fileExists()) {
            throw new ddl_exception('ddlxmlfileerror', null, 'File does not exist');
        }

        $loaded = $xmldb_file->loadXMLStructure();
        if (!$loaded || !$xmldb_file->isLoaded()) {
            // Show info about the error if we can find it
            if ($structure = $xmldb_file->getStructure()) {
                if ($errors = $structure->getAllErrors()) {
                    throw new ddl_exception('ddlxmlfileerror', null, 'Errors found in XMLDB file: '. implode (', ', $errors));
                }
            }
            throw new ddl_exception('ddlxmlfileerror', null, 'not loaded??');
        }

        return $xmldb_file;
    }
1128881
public function load($file, $type = null)
    {
        $path = $this->locator->locate($file);

        $xml = $this->parseFile($path);
        $xml->registerXPathNamespace('config', 'http://thelia.net/schema/dic/config');

        $this->removeScope($xml);

        $this->container->addResource(new FileResource($path));

        $this->parseLoops($xml);

        $this->parseFilters($xml);

        $this->parseTemplateDirectives($xml);

        $this->parseParameters($xml);

        $this->parseCommands($xml);

        $this->parseForms($xml);

        $this->parseDefinitions($xml, $path);

        $this->parseHooks($xml, $path, $type);

        $this->propelOnlyRun(
            [$this, "parseExportCategories"],
            $xml
        );

        $this->propelOnlyRun(
            [$this, "parseExports"],
            $xml
        );

        $this->propelOnlyRun(
            [$this, "parseImportCategories"],
            $xml
        );

        $this->propelOnlyRun(
            [$this, "parseImports"],
            $xml
        );
    }
957777
public static function process($file = NULL){

        $exists = isset( self::$data[ self::$level ] );

        if( $exists ){
            $variables = self::$data[ self::$level ];

            foreach( $variables as $key => $value ){
                global $$key;
                $$key = $value;
            }
        }

        if( $file ){
            require $file;
        }

    }
1110034
public function load(string $file)
    {
        $this->data = Yaml::parse(file_get_contents($file));
        $this->filename = basename($file);
    }
1296845
public function insertFile($file)
    {
        if ( ! $this->checkedIndexes) {
            $this->ensureIndexes();
        }

        $this->filesCollection->insertOne($file);
    }