load
@param array                        $file
@param \League\Flysystem\Filesystem $fileReader
@return mixed
@throws \eig\Configurator\Exceptions\ConfiguratorException
513260
public function load(array $file, Filesystem $fileReader)
    {
        if ($this->checkFile($file, $fileReader, $type = 'json') == true) {
            $this->open($file, $fileReader);
            if ($this->checkContentsAreArray() == true) {
                return $this->rawContents;
            }
        }
    }
94238
public function load($file)
    {
        $loader = new PhpConfig();
        $widgets = $loader->read($file);
        $this->add($widgets);
    }
103880
protected function loadConfigurationFile(array $config, XmlFileLoader $loader)
    {
        foreach ($config as $filename) {
            if (file_exists($file = sprintf('%s/%s.xml', $this->getConfigurationDirectory(), $filename))) {
                $loader->load($file);
            }
        }
    }
1292347
public function load($file, $type = null)
    {
        $path = $this->locator->locate($file);
        $this->setCurrentDir(dirname($path));

        $config = require $path;

        // not an array
        if (!is_array($config)) {
            throw new \InvalidArgumentException(sprintf('The file "%s" must contain a PHP array.', $path));
        }

        return $config;
    }
395466
public function loadFile($file)
    {
        if (!is_file($file)) {
            throw new \RuntimeException(sprintf('File: %s not found.', $file));
        }

        $this->body = function () use ($file) {
            return file_get_contents($file);
        };

        $this->setFilename(pathinfo($file, PATHINFO_BASENAME));

        return $this;
    }
617245
public function load($file, array $options = []): Config
    {
        expect_type($file, 'string');

        $options += $this->options;
        $path = $this->absolutePath($file, $options['base_path'] ?? getcwd());

        if (!$this->assertFile($path, $options)) {
            return new Config();
        }

        $data = $this->loadFile($path, $options);
        $this->assertData($data, $file);

        return new Config($data);
    }
802679
public static function load( $fileName, $offset = NULL, $limit = NULL )
	{
		$file	= new FS_File_Reader( $fileName );
		$lines	= $file->readArray();
		if( $offset !== NULL && $limit !== NULL && (int) $limit !==  0 )
			$lines	= array_slice( $lines, abs( (int) $offset ), (int) $limit );
		else if( $offset !== NULL && (int) $offset !== 0 )
			$lines	= array_slice( $lines, (int) $offset );
		return $lines;
	}
32697
public function load($file)
    {
        $dir = $this->getDir();

        if (!$this->filesystem->exists($dir . $file)) {
            throw new NotFoundException('File not found.');
        }

        return file_get_contents($dir . $file);
    }
1169363
public function load($file)
	{
		$handle = strcasecmp(substr($file, -3), '.gz') ? fopen($file, 'rb') : gzopen($file, 'rb');
		if (!$handle) {
			throw new Exception("ERROR: Cannot open file '$file'.");
		}
		return $this->read($handle);
	}
1120265
public function load(PhingFile $file)
    {
        if ($file->canRead()) {
            $this->parse($file);

            $this->file = $file;
        } else {
            throw new IOException("Can not read file " . $file->getPath());
        }
    }
74887
final protected function loadArray($file)
    {
        if (is_file($file)) {
            $array = include($file);

            if (is_array($array)) {
                return $array;
            } else {
                trigger_error(sprintf('Included file "%s" should return an array not %s', $file, gettype($array)));
            }

        } else {
            return array();
        }
    }
280697
protected function load($filename)
    {
        $this->catalog = array();

        $fp = fopen($filename, 'rb', false);
        if ($fp === false) {
            throw new \RuntimeException("Could not read $filename");
        }

        $data = fread($fp, 20);
        if (strlen($data) != 20) {
            throw new \RuntimeException('Invalid file');
        }

        $magic = substr($data, 0, 4);
        if ($magic === "\x95\x04\x12\xde") {
            $dword = 'N';
        } elseif ($magic === "\xde\x12\x04\x95") {
            $dword = 'V';
        } else {
            throw new \RuntimeException('Invalid file');
        }

        list(, $revision) = unpack("@4/${dword}", $data);

        if ($revision !== 0) {
            throw new \RuntimeException('Invalid file');
        }

        list(, $count, $origOffset, $transOffset) = unpack("@8/${dword}3", $data);

        fseek($fp, $origOffset);
        $origEntries = array();
        for ($i = 0; $i < $count; $i++) {
            $origEntries[] = unpack("${dword}2", fread($fp, 8));
        }

        fseek($fp, $transOffset);
        $transEntries = array();
        for ($i = 0; $i < $count; $i++) {
            $transEntries[] = unpack("${dword}2", fread($fp, 8));
        }

        for ($i = 0; $i < $count; $i++) {
            fseek($fp, $origEntries[$i][2]);
            $msgid = $origEntries[$i][1] > 0 ? fread($fp, $origEntries[$i][1]) : "";
            fseek($fp, $transEntries[$i][2]);
            $translations = $transEntries[$i][1] > 0 ? explode("\x00", fread($fp, $transEntries[$i][1])) : "";

            $ctx = self::NO_CONTEXT;
            if (($pos = strpos($msgid, self::NO_CONTEXT)) !== false) {
                $ctx = (string) substr($msgid, 0, $pos);
                $msgid = (string) substr($msgid, $pos + 1);
            }

            $this->catalog[$ctx][$msgid] = $translations;
        }
    }
910056
protected function initReader(FileInterface $file) {
		$extension = $file->getExtension();
		
		if ($extension === 'xml') {
			return new Config\XmlReader($file);
		}
		
		throw new Exceptions\InvalidConfig('Unknown type of configuration "' . $extension . '"');
	}
636708
public static function load( $fileName )
	{
		$parser	= new XML_DOM_Parser();
		$xml	= FS_File_Reader::load( $fileName );
		$tree	= $parser->parse( $xml );
		return $tree;
	}
933208
public final function loadFile($file) {
        $f = $this->getPath($file);
        if (is_file($f) && is_readable($f)) {
            return @file_get_contents($f);
        }

        return false;
    }
332490
public function read($file)
    {
        $this->filePath = $file;
        $this->config = parse_ini_file($this->filePath);
    }
207898
protected function load_file($file)
	{
		$contents = $this->parse_vars(file_get_contents($file));
		return \Format::forge($contents, 'yaml')->to_array();
	}