Table of Contents
Table 1.
| Class | Apache2ConfigParser | |
|---|---|---|
|
Operations: | ||
|
visibility |
return |
name |
| public |
void | initialize |
| constructor | ||
| public |
void | parse! |
| opens the config file and parses its contents into the config tree. throws an exception if the file does not exist or an invalid configuration option was found (this happens, if the current configuration section disallows the found statement) | ||
| public | to_s | |
| returns the string representation of the configuration, i.e. the syntactically correct apache2 config file. | ||
| public |
void | []= |
| change given configuration directive. Example: config[24] = new Apache2ConfigDirective('Alias', '/foo /bar/foo') | ||
| public |
void | [] |
| returns the requested configuration directive. Example: set "Allow from all" at position 42, if that directive is an "Allow" directive config[42].value = 'from all' if config[42].name == 'Allow' Example: assuming there is a "VirtualHost" section on pos 42 has a "DocumentRoot" directive on pos 3, set this to "/home/www/foo": config[42][3].value = "/home/www/foo" | ||
| public |
void | each |
| the iterator function | ||
Table 3.
| Class | Apache2ConfigSection | |
|---|---|---|
| Attributes: | ||
| visibility | type | name |
| protected | name | |
| protected | allowed_directives | |
|
Operations: | ||
|
visibility |
return |
name |
| public |
void | to_s |
| String Representation of this object to be stored in the config file | ||
| public | allowed? | |
| returns TRUE if the given directive is allowed within current context (=configuration section), or FALSE otherwise. | ||