+ // setDefinedValue either sets or deletes a defined value identified by name.
+ function setDefinedValue($name, $set = true) {
+ if ($set) {
+ // Setting part.
+ if (!$this->getDefinedValue($name)) {
+ $this->config_array[] = $name;
+ $this->config = implode(',', $this->config_array);
+ return;
+ }
+ } else {
+ // Deleting part.
+ foreach ($this->config_array as $key => $value) {
+ if ($value === $name) {
+ unset($this->config_array[$key]);
+ $this->config = implode(',', $this->config_array);
+ return;
+ }
+ }
+ }
+ }
+