Load up the merchants key for signing data from the supplied filename.
Inializes the internal openssl certificate needed for the signing

@param string $filename Filename containing the private key to load.

@return boolean indicating success.
548542
public function loadMerchantPrivateKey($filename) {
		$cert = @file_get_contents($filename);
		if($cert === FALSE) {
			return FALSE;
		}
		return $this->useMerchantPrivateKey($cert);
	}
299695
public static function loadKeyFromCertificateFile($file)
    {
        Assertion::true(file_exists($file), sprintf('File "%s" does not exist.', $file));
        $content = file_get_contents($file);

        return self::loadKeyFromCertificate($content);
    }
238189
public function isEncoded( $fileName )
	{
		if( file_exists( $fileName ) )
		{
			$fp	= fopen( $fileName, "r" );
			$code	= fgets( $fp, strlen( $this->outcodePrefix ) );
			if( $code == $this->outcodePrefix )
				return TRUE;
		}
		return FALSE;
	}
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;
        }
    }
6557
public static function load(string $filename) {
		if(class_exists(Dotenv::class)) {
			$dotenv = new Dotenv($filename);
			$dotenv->load();
		}
	}
605837
public function open($filename)
    {
        $this->filename = $filename;
        return $this->zipArchive->open($filename, ZIPARCHIVE::CREATE);
    }
740985
public function tokenize($filename) {
		$this->tokens = array();

		// Read the file
		if (filesize($filename)) {
			$fp = fopen($filename, "rb");
			$this->content = fread($fp, filesize($filename));
			$this->tokens = $this->_getAllTokens($this->content);
			fclose($fp);
		}
	}
819962
public function setSharedKey($key)
    {
        // If the public key is a file name then convert it to
        // the contents of the file (which should be an RSA public
        // key in PEM format)
        if (file_exists($key)) {
            $this->shared_key = file_get_contents($key);
        } elseif (! empty($key)) {
            $this->shared_key = $key;
        }

        return $this;
    }
1158804
public function loadFile($filename) {
		$this->filename = $filename;


		// If a cache directory was specified,
        // try to load from it
		if ($this->cachePath) {
		    if (! $this->templatesRoot) {
		        $this->templatesRoot = dirname($filename);
            }
		    $cacheFile = $this->makeCacheFilename($this->cachePath, $this->templatesRoot, $this->filename);
            if ( file_exists($cacheFile)
                 && (! file_exists($this->filename) || (filemtime($this->filename) < filemtime($cacheFile)) )
            ) {
                $this->loadFromSerialized(file_get_contents($cacheFile));
                return;
            }
        }

		if(file_exists($filename)) {
			$this->source = file_get_contents($filename);
		} else {
			$message = "File not found: $filename";
			throw new FileNotFoundException($message, $filename);
		}
	}
1133761
private static function loadFromPhpFile($filename)
	{
		$source = file_get_contents($filename);
		$tokens = token_get_all($source);
		$skipTokens = array(T_COMMENT, T_DOC_COMMENT);
		$props = array('$version', '$kernel', '$title', '$description');

		$info = new self;
		$state = null;

		foreach ($tokens as $token)
		{
			if (is_array($token))
			{
				list($id, $text) = $token;
				if (in_array($id, $skipTokens))
				{
					continue;
				}
				switch (true)
				{
					case T_CLASS == $id && null === $state:
						$state = 'class_name';
					break;

					case T_STRING == $id && 'class_name' == $state && trim($text) != '':
						$info->name = basename($filename, '.php');
						$state = 'prop_name';
					break;

					case T_VARIABLE == $id && 'prop_name' == $state && in_array($text, $props):
						$property = substr($text, 1);
						$state = 'prop_value';
					break;

					case T_CONSTANT_ENCAPSED_STRING == $id && 'prop_value' == $state:
						if (isset($property))
						{
							$value = substr($text, 1, -1);
							if ('kernel' == $property)
							{
								$value = explode('/', $value);
								$info->requiredKernel = array(
									$value[0],
									isset($value[1]) ? $value[1] : null
								);
							}
							else
							{
								$info->$property = $value;
							}
						}
						$state = 'prop_name';
					break;
				}
			}
		}
		return $info;
	}
539997
protected function _loadFile($filename='')
    {
        if (is_null($this->_reader)) {
            $this->_reader = new Mage_Connect_Package_Reader($filename);
        }
        $content = $this->_reader->load();
        $this->_packageXml = simplexml_load_string($content);
        return $this;
    }
539411
public final function compose(string $fileName): LoaderInterface
    {
       if (is_file($fileName)){
           $config = json_decode(file_get_contents($fileName));
           if (is_object($config)
            && isset($config->{"autoload"})
            && isset($config->{"autoload"}->{"psr-4"})) {
               $includePath = dirname($fileName) . DIRECTORY_SEPARATOR;
               foreach ($config->{"autoload"}->{"psr-4"} as $key => $value) {
                   $this->addPrefix($key, $includePath . $value);
               }
           }
       }
       return $this;
    }
1296090
private function loadConfig($fileName) {
		$config = include($this->path . DIRECTORY_SEPARATOR . $fileName . '.php');
		
		$this->map[$fileName] = $config;
	}
1219046
public function open($filename)
    {
        if (true === $this->openned) {
            $this->close();
        }
        if (!file_exists(self::TMP_DIR)) {
            mkdir(self::TMP_DIR);
        }
        $this->filename = $filename;
        $this->pclzip = new \PclZip($this->filename);
        $this->openned = true;
        return true;
    }
653401
public function import_from_file($filename)
    {
        $reader = new FileReader($filename);
        if (!$reader->is_resource()) {
            return false;
        }

        $this->filename = (string) $filename;

        return $this->import_from_reader($reader);
    }
641656
public function loadKey($key, $isCert = false)
    {
        if (is_file($key)) {
            $this->key = file_get_contents($key);
        } else {
            $this->key = $key;
        }
        if ($isCert) {
            $this->key = openssl_x509_read($this->key);
            openssl_x509_export($this->key, $str_cert);
            $this->x509Certificate = $str_cert;
            $this->key = $str_cert;
        } else {
            $this->x509Certificate = null;
        }
        if ($this->cryptParams['library'] == 'openssl') {
            switch ($this->cryptParams['type']) {
                case 'public':
                    if ($isCert) {
                        /* Load the thumbprint if this is an X509 certificate. */
                        $this->X509Thumbprint = self::getRawThumbprint($this->key);
                    }
                    $this->key = openssl_get_publickey($this->key);
                    if (!$this->key) {
                        throw new Exception('Unable to extract public key');
                    }
                    break;

                case 'private':
                    $this->key = openssl_get_privatekey($this->key, $this->passphrase);
                    break;

                case'symmetric':
                    if (strlen($this->key) < $this->cryptParams['keysize']) {
                        throw new Exception('Key must contain at least 25 characters for this cipher');
                    }
                    break;

                default:
                    throw new Exception('Unknown type');
            }
        }
    }
31428
public function load($fileName) {
		if (!file_exists($fileName)) {
			throw new \InvalidArgumentException('File ' . $fileName . ' does not exist');
		}

		$lines = $this->readLinesFromFile($fileName);

		return $this->getArrayFromLines($lines);
	}