3
// Author: Sebastian Voecking <sebastian.voecking@uni-muenster.de>
7
private $fEntries = array();
9
function __construct($filename)
11
$file = fopen($filename, 'r');
14
while (!feof($file)) {
18
$pos = strpos($line, '#');
20
$line = substr($line, 0, $pos);
24
if (strlen($line) == 0) continue;
26
$pos = strpos($line, '=');
28
$key = rtrim(substr($line, 0, $pos));
29
$value = ltrim(substr($line, $pos + 1));
31
$this->fEntries[$key] = $value;
39
function GetValue($key, $default=NULL)
41
if (array_key_exists($key, $this->fEntries)) {
42
return $this->fEntries[$key];
49
function GetValueList($key, $default=NULL)
51
if (array_key_exists($key, $this->fEntries)) {
54
$tok = strtok($this->fEntries[$key], ',');
55
while ($tok !== false) {
56
$items[] = trim($tok);