- $bits = explode("\0", $params);
- foreach ($bits as $bit)
- {
- $frags = explode("=", $bit, 2);
- $key = $frags[0];
- $val = isset($frags[1]) ? $frags[1] : '';
- if (isset($this->params[$key])) {
- $this->params[$key] = $val;
- }
+ $this->params[$key]['value'] = $val;
+ }
+
+
+ /** Return an array of parameter names.
+ */
+ function getParamNames()
+ {
+ return array_keys($this->params);
+ }
+
+
+ /** Return the value of a parameter of the plugin.
+ */
+ function getParamValue($key)
+ {
+ return isset($this->params[$key]['value']) ? $this->params[$key]['value'] : '';
+ }
+
+
+ /** Set the value of a parameter of the plugin.
+ */
+ function setParamValue($key, $val)
+ {
+ if (isset($this->params[$key]['value'])) {
+ $this->params[$key]['value'] = $val;