Pipe\Config::fromYaml PHP Method

fromYaml() static public method

# Returns a new Config object.
static public fromYaml ( $file )
    static function fromYaml($file)
    {
        if (!file_exists($file)) {
            throw new \InvalidArgumentException("Config file '{$file}' not found.");
        }
        $values = Yaml::parse(file_get_contents($file));
        $config = new static($values, $file);
        return $config;
    }