NAME

FS::Conf - Freeside configuration values


SYNOPSIS

  use FS::Conf;
  $conf = new FS::Conf "/config/directory";
  $FS::Conf::default_dir = "/config/directory";
  $conf = new FS::Conf;
  $dir = $conf->dir;
  $value = $conf->config('key');
  @list  = $conf->config('key');
  $bool  = $conf->exists('key');
  @config_items = $conf->config_items;


DESCRIPTION

Read and write Freeside configuration values. Keys currently map to filenames, but this may change in the future.


METHODS

new [ DIRECTORY ]
Create a new configuration object. A directory arguement is required if $FS::Conf::default_dir has not been set.

dir
Returns the directory.

config
Returns the configuration value or values (depending on context) for key.

exists
Returns true if the specified key exists, even if the corresponding value is undefined.

touch
set
delete
config_items
Returns all of the possible configuration items as FS::ConfItem objects. See the FS::ConfItem manpage.


BUGS

Write access (touch, set, delete) should be documented.

If this was more than just crud that will never be useful outside Freeside I'd worry that config_items is freeside-specific and icky.


SEE ALSO

``Configuration'' in the web interface (config/config.cgi).

httemplate/docs/config.html