3 <TITLE>FS::Conf - Freeside configuration values</TITLE>
4 <LINK REV="made" HREF="mailto:perl@packages.debian.org">
9 <A NAME="__index__"></A>
14 <LI><A HREF="#name">NAME</A></LI>
15 <LI><A HREF="#synopsis">SYNOPSIS</A></LI>
16 <LI><A HREF="#description">DESCRIPTION</A></LI>
17 <LI><A HREF="#methods">METHODS</A></LI>
18 <LI><A HREF="#bugs">BUGS</A></LI>
19 <LI><A HREF="#see also">SEE ALSO</A></LI>
25 <H1><A NAME="name">NAME</A></H1>
26 <P>FS::Conf - Freeside configuration values</P>
29 <H1><A NAME="synopsis">SYNOPSIS</A></H1>
33 $conf = new FS::Conf "/config/directory";</PRE>
35 $FS::Conf::default_dir = "/config/directory";
36 $conf = new FS::Conf;</PRE>
38 $dir = $conf->dir;</PRE>
40 $value = $conf->config('key');
41 @list = $conf->config('key');
42 $bool = $conf->exists('key');</PRE>
44 @config_items = $conf->config_items;</PRE>
47 <H1><A NAME="description">DESCRIPTION</A></H1>
48 <P>Read and write Freeside configuration values. Keys currently map to filenames,
49 but this may change in the future.</P>
52 <H1><A NAME="methods">METHODS</A></H1>
54 <DT><STRONG><A NAME="item_new_%5B_DIRECTORY_%5D">new [ DIRECTORY ]</A></STRONG><BR>
56 Create a new configuration object. A directory arguement is required if
57 $FS::Conf::default_dir has not been set.
59 <DT><STRONG><A NAME="item_dir">dir</A></STRONG><BR>
61 Returns the directory.
63 <DT><STRONG><A NAME="item_config">config</A></STRONG><BR>
65 Returns the configuration value or values (depending on context) for key.
67 <DT><STRONG><A NAME="item_exists">exists</A></STRONG><BR>
69 Returns true if the specified key exists, even if the corresponding value
72 <DT><STRONG><A NAME="item_touch">touch</A></STRONG><BR>
74 <DT><STRONG><A NAME="item_set">set</A></STRONG><BR>
76 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
78 <DT><STRONG><A NAME="item_config_items">config_items</A></STRONG><BR>
80 Returns all of the possible configuration items as FS::ConfItem objects. See
81 <A HREF=".././FS/ConfItem.html">the FS::ConfItem manpage</A>.
85 <H1><A NAME="bugs">BUGS</A></H1>
86 <P>Write access (touch, set, delete) should be documented.</P>
87 <P>If this was more than just crud that will never be useful outside Freeside I'd
88 worry that config_items is freeside-specific and icky.</P>
91 <H1><A NAME="see also">SEE ALSO</A></H1>
92 <P>``Configuration'' in the web interface (config/config.cgi).</P>
93 <P>httemplate/docs/config.html</P>