ConfEnv: Conf Environment

Description Usage Arguments Methods

Description

A Conf Environment Class.

Usage

1
2
3
4
5
6
  Conf = ConfEnv$new(system.file("extdata/example.yml", package="rconf"))
  Conf$configuration
  Conf$getorstop("config")
  Conf$getorstop("db.host")
  Conf$getornull("config")
  Conf$getornull("db.user")

Arguments

filename The filename of configuration file filetype The filetype of configuration file values should be one of "" "yml", "json", "ini", default is "" which autodetect filetype by file extension

Methods

$new Initialize a Conf interface $load Load a configuration file $getornull get value of configuration file by path, if does not exists return null. the path is seperate by . as default. modify it by specify sep parameter. $getorstop get value of configuration file by path, if does not exists stop program, the path is seperate by . as default. modify it by specify sep parameter.


obarisk/rconf documentation built on May 3, 2019, 9:01 p.m.