19 require_once(BASE.
"wcmf/lib/util/class.InifileParser.php");
20 require_once(BASE.
"wcmf/lib/util/class.FileUtil.php");
46 static $instance = null;
48 if (!isset($instance))
53 $baseInstance = &$instance;
68 global $CONFIG_PATH, $CONFIG_EXTENSION;
70 return $fileUtil->getFiles($CONFIG_PATH,
"/\.".$CONFIG_EXTENSION.
"$/",
true);
84 if (strlen($resource) > 0 && strlen($context) > 0 && strlen($action) > 0)
86 $key = $resource.$this->_actionDelimiter.$context.$this->_actionDelimiter.$action;
87 if ($parser->getValue($key, $section,
false) !==
false)
92 if (strlen($resource) > 0 && strlen($action) > 0)
94 $key = $resource.$this->_actionDelimiter.$this->_actionDelimiter.$action;
95 if ($parser->getValue($key, $section,
false) !==
false)
100 if (strlen($resource) > 0 && strlen($context) > 0)
102 $key = $resource.$this->_actionDelimiter.$context.$this->_actionDelimiter;
103 if ($parser->getValue($key, $section,
false) !==
false)
108 if (strlen($context) > 0 && strlen($action) > 0)
110 $key = $this->_actionDelimiter.$context.$this->_actionDelimiter.$action;
111 if ($parser->getValue($key, $section,
false) !==
false)
116 if (strlen($action) > 0)
118 $key = $this->_actionDelimiter.$this->_actionDelimiter.$action;
119 if ($parser->getValue($key, $section,
false) !==
false)
124 if (strlen($resource) > 0)
126 $key = $resource.$this->_actionDelimiter.$this->_actionDelimiter;
127 if ($parser->getValue($key, $section,
false) !==
false)
132 if (strlen($context) > 0)
134 $key = $this->_actionDelimiter.$context.$this->_actionDelimiter;
135 if ($parser->getValue($key, $section,
false) !==
false)
140 $key = $this->_actionDelimiter.$this->_actionDelimiter;
141 if ($parser->getValue($key, $section,
false) !==
false)
157 return $parser->getErrorMsg();
165 return $parser->parseIniFile($filename, $processValues);
173 return $parser->getData();
181 return $parser->getSections();
189 return $parser->getSection($section);
197 return $parser->getValue($key, $section);
parseIniFile($filename, $processValues=true)
WCMFInifileParser adds methods for wcmf specific inifiles. This class is a decorator to the InifilePa...
getBestActionKey($section, $resource, $context, $action)
FileUtil provides basic support for file functionality like HTTP file upload.