/** * return true if change was successful false if not (duplicate rulename?) * @return bool * @param string $name new name for the rule */ public function setName($name) { if ($this->name == $name) { return true; } if (isset($this->owner)) { if ($this->owner->isRuleNameAvailable($name)) { $oldname = $this->name; $this->name = $name; $this->owner->ruleWasRenamed($this, $oldname); } else { return false; } } $this->name = $name; $this->xmlroot->setAttribute('name', $name); return true; }