7b1613efdd93b2b9688c836ab78b226a83dfb78c
[freeside.git] / htdocs / docs / man / FS / Conf.html
1 <HTML>
2 <HEAD>
3 <TITLE>FS::Conf - Read access to 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 - Read access to 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 <P>
44 <HR>
45 <H1><A NAME="description">DESCRIPTION</A></H1>
46 <P>Read access to Freeside configuration values.  Keys currently map to filenames,
47 but this may change in the future.</P>
48 <P>
49 <HR>
50 <H1><A NAME="methods">METHODS</A></H1>
51 <DL>
52 <DT><STRONG><A NAME="item_new_%5B_DIRECTORY_%5D">new [ DIRECTORY ]</A></STRONG><BR>
53 <DD>
54 Create a new configuration object.  A directory arguement is required if
55 $FS::Conf::default_dir has not been set.
56 <P></P>
57 <DT><STRONG><A NAME="item_dir">dir</A></STRONG><BR>
58 <DD>
59 Returns the directory.
60 <P></P>
61 <DT><STRONG><A NAME="item_config">config</A></STRONG><BR>
62 <DD>
63 Returns the configuration value or values (depending on context) for key.
64 <P></P>
65 <DT><STRONG><A NAME="item_exists">exists</A></STRONG><BR>
66 <DD>
67 Returns true if the specified key exists, even if the corresponding value
68 is undefined.
69 <P></P></DL>
70 <P>
71 <HR>
72 <H1><A NAME="bugs">BUGS</A></H1>
73 <P>Write access (with locking) should be implemented.</P>
74 <P>
75 <HR>
76 <H1><A NAME="see also">SEE ALSO</A></H1>
77 <P>config.html from the base documentation contains a list of configuration files.</P>
78
79 </BODY>
80
81 </HTML>