static public function fromFile(string $filename)
    {
        $yaml = filter_var($filename, FILTER_VALIDATE_URL)
            ? yaml_parse_url($filename)
            : yaml_parse_file($filename);

        YamlException::importFromFile($yaml);
        return $yaml;
    }
static public function fromFile(string $filename)
    {
        $yaml = filter_var($filename, FILTER_VALIDATE_URL)
            ? yaml_parse_url($filename)
            : yaml_parse_file($filename);

        YamlException::importFromFile($yaml);
        return $yaml;
    }
static public function fromFile ( string $ filename ) { $ yaml = filter_var ( $ filename , FILTER_VALIDATE_URL ) ? yaml_parse_url ( $ filename ) : yaml_parse_file ( $ filename ) ; YamlException :: importFromFile ( $ yaml ) ; return $ yaml ; }
Read YAML from file or by URL

@param   string $filename - Name of file or url from which YAML must be taken
@return  mixed
@throws  YamlException
Read YAML from file or by URL