563eea8780b691d4d0c1cae1b5e9f3693133f185
[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:none">
5 </HEAD>
6
7 <BODY>
8
9 <!-- INDEX BEGIN -->
10
11 <UL>
12
13         <LI><A HREF="#NAME">NAME</A>
14         <LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
15         <LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
16         <LI><A HREF="#METHODS">METHODS</A>
17         <LI><A HREF="#BUGS">BUGS</A>
18         <LI><A HREF="#SEE_ALSO">SEE ALSO</A>
19 </UL>
20 <!-- INDEX END -->
21
22 <HR>
23 <P>
24 <H1><A NAME="NAME">NAME</A></H1>
25 <P>
26 FS::Conf - Read access to Freeside configuration values
27
28 <P>
29 <HR>
30 <H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
31 <P>
32 <PRE>  use FS::Conf;
33 </PRE>
34 <P>
35 <PRE>  $conf = new FS::Conf &quot;/config/directory&quot;;
36 </PRE>
37 <P>
38 <PRE>  $FS::Conf::default_dir = &quot;/config/directory&quot;;
39   $conf = new FS::Conf;
40 </PRE>
41 <P>
42 <PRE>  $dir = $conf-&gt;dir;
43 </PRE>
44 <P>
45 <PRE>  $value = $conf-&gt;config('key');
46   @list  = $conf-&gt;config('key');
47   $bool  = $conf-&gt;exists('key');
48 </PRE>
49 <P>
50 <HR>
51 <H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
52 <P>
53 Read access to Freeside configuration values. Keys currently map to
54 filenames, but this may change in the future.
55
56 <P>
57 <HR>
58 <H1><A NAME="METHODS">METHODS</A></H1>
59 <DL>
60 <DT><STRONG><A NAME="item_new">new [ DIRECTORY ]</A></STRONG><DD>
61 <P>
62 Create a new configuration object. A directory arguement is required if
63 $FS::Conf::default_dir has not been set.
64
65 <DT><STRONG><A NAME="item_dir">dir</A></STRONG><DD>
66 <P>
67 Returns the directory.
68
69 <DT><STRONG><A NAME="item_config">config</A></STRONG><DD>
70 <P>
71 Returns the configuration value or values (depending on context) for key.
72
73 <DT><STRONG><A NAME="item_exists">exists</A></STRONG><DD>
74 <P>
75 Returns true if the specified key exists, even if the corresponding value
76 is undefined.
77
78 </DL>
79 <P>
80 <HR>
81 <H1><A NAME="BUGS">BUGS</A></H1>
82 <P>
83 Write access (with locking) should be implemented.
84
85 <P>
86 <HR>
87 <H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
88 <P>
89 config.html from the base documentation contains a list of configuration
90 files.
91
92 </BODY>
93
94 </HTML>