src/YamlConfigurationLoader.php
protected function loadSource(\SplFileInfo $source, array $params = [])
	{
		$cfg = @file_get_contents($source->getPathname());
	
		if($cfg === false)
		{
			throw new \RuntimeException(sprintf('Configuration source not found: "%s"', $source->getPathname()));
		}
	
		$replacements = [];
	
		foreach($params as $k => $v)
		{
			$replacements['%' . $k . '%'] = trim($v);
		}
	
		return trim(strtr($cfg, $replacements));
	}
protected function loadSource(\SplFileInfo $source, array $params = [])
	{
		$cfg = @file_get_contents($source->getPathname());
	
		if($cfg === false)
		{
			throw new \RuntimeException(sprintf('Configuration source not found: "%s"', $source->getPathname()));
		}
	
		$replacements = [];
	
		foreach($params as $k => $v)
		{
			$replacements['%' . $k . '%'] = trim($v);
		}
	
		return trim(strtr($cfg, $replacements));
	}
protected function loadSource ( \ SplFileInfo $ source , array $ params = [ ] ) { $ cfg = @ file_get_contents ( $ source -> getPathname ( ) ) ; if ( $ cfg === false ) { throw new \ RuntimeException ( sprintf ( 'Configuration source not found: "%s"' , $ source -> getPathname ( ) ) ) ; } $ replacements = [ ] ; foreach ( $ params as $ k => $ v ) { $ replacements [ '%' . $ k . '%' ] = trim ( $ v ) ; } return trim ( strtr ( $ cfg , $ replacements ) ) ; }
Loads the contents of the given file and replaces %-delimited placeholders
with the given values.

@param \SplFileInfo $source
@param array<string, mixed> $params
@return string

@throws \RuntimeException When the file could not be accessed.
Loads the contents of the given file and replaces % - delimited placeholders with the given values .