Cascade\Config\Loader\FileLoader\FileLoaderAbstract::readFrom PHP Method

readFrom() public method

Read from a file or string
public readFrom ( string $input ) : string
$input string Filepath or string
return string Return a string from read file or directly from $input
    public function readFrom($input)
    {
        if ($this->isFile($input)) {
            if (is_readable($input) === false) {
                throw new \RuntimeException(sprintf('Unable to parse "%s" as the file is not readable.', $input));
            }
            // $input is a filepath, so we load that file
            $input = file_get_contents($input);
        }
        return trim($input);
    }