Smutty_Object
|
+--Smutty_Config
public class Smutty_Config
extends Smutty_Object
| Constructor Summary | |
|---|---|
constructor. |
|
| Method Summary | |
|---|---|
| String | get(String name) looks for a config setting matching the given name. |
| static Smutty_Config | returns the singleton for this object |
| private String | getWildcardRegExp(String name) converts a string into a regexp where wildcards (*'s) will be matched in it. |
| nothing | loadConfig(String path) loads the config with data from the specified file. |
| nothing | this function loads the default config files |
| nothing | loadLine(String line) processes a single line of configuration info |
public Smutty_Config()
constructor. creates a new config class.
public String get(String name)
looks for a config setting matching the given name. you can use a "*" as a wildcard
public static Smutty_Config getInstance()
returns the singleton for this object
private String getWildcardRegExp(String name)
converts a string into a regexp where wildcards (*'s) will be matched in it.
public nothing loadConfig(String path)
loads the config with data from the specified file. this will not overwrite any data, so it can be called multiple times to load data from multiple config files.
public nothing loadDefaults()
this function loads the default config files
public nothing loadLine(String line)
processes a single line of configuration info
this class creates allows access to config files in an easy way. normally for Smutty a singleton instance is maintained (accessed through getInstance())