- web interface for hourly account charges!
[freeside.git] / httemplate / docs / man / FS / Conf.html
1 <HTML>
2 <HEAD>
3 <TITLE>FS::Conf - Freeside configuration values</TITLE>
4 <LINK REV="made" HREF="mailto:perl@packages.debian.org">
5 </HEAD>
6
7 <BODY>
8
9 <A NAME="__index__"></A>
10 <!-- INDEX BEGIN -->
11
12 <UL>
13
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>
20 </UL>
21 <!-- INDEX END -->
22
23 <HR>
24 <P>
25 <H1><A NAME="name">NAME</A></H1>
26 <P>FS::Conf - Freeside configuration values</P>
27 <P>
28 <HR>
29 <H1><A NAME="synopsis">SYNOPSIS</A></H1>
30 <PRE>
31   use FS::Conf;</PRE>
32 <PRE>
33   $conf = new FS::Conf &quot;/config/directory&quot;;</PRE>
34 <PRE>
35   $FS::Conf::default_dir = &quot;/config/directory&quot;;
36   $conf = new FS::Conf;</PRE>
37 <PRE>
38   $dir = $conf-&gt;dir;</PRE>
39 <PRE>
40   $value = $conf-&gt;config('key');
41   @list  = $conf-&gt;config('key');
42   $bool  = $conf-&gt;exists('key');</PRE>
43 <PRE>
44   @config_items = $conf-&gt;config_items;</PRE>
45 <P>
46 <HR>
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>
50 <P>
51 <HR>
52 <H1><A NAME="methods">METHODS</A></H1>
53 <DL>
54 <DT><STRONG><A NAME="item_new_%5B_DIRECTORY_%5D">new [ DIRECTORY ]</A></STRONG><BR>
55 <DD>
56 Create a new configuration object.  A directory arguement is required if
57 $FS::Conf::default_dir has not been set.
58 <P></P>
59 <DT><STRONG><A NAME="item_dir">dir</A></STRONG><BR>
60 <DD>
61 Returns the directory.
62 <P></P>
63 <DT><STRONG><A NAME="item_config">config</A></STRONG><BR>
64 <DD>
65 Returns the configuration value or values (depending on context) for key.
66 <P></P>
67 <DT><STRONG><A NAME="item_exists">exists</A></STRONG><BR>
68 <DD>
69 Returns true if the specified key exists, even if the corresponding value
70 is undefined.
71 <P></P>
72 <DT><STRONG><A NAME="item_touch">touch</A></STRONG><BR>
73 <DD>
74 <DT><STRONG><A NAME="item_set">set</A></STRONG><BR>
75 <DD>
76 <DT><STRONG><A NAME="item_delete">delete</A></STRONG><BR>
77 <DD>
78 <DT><STRONG><A NAME="item_config_items">config_items</A></STRONG><BR>
79 <DD>
80 Returns all of the possible configuration items as FS::ConfItem objects.  See
81 <A HREF=".././FS/ConfItem.html">the FS::ConfItem manpage</A>.
82 <P></P></DL>
83 <P>
84 <HR>
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>
89 <P>
90 <HR>
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>
94
95 </BODY>
96
97 </HTML>