private function setup_object($preference) { if (!$preference || !is_object($preference)) { return null; } if ($this->name && MValidate::pref_name($this->name)) { $preference->name = $this->name; } else { return null; } if ($this->value && MValidate::pref_value($this->value)) { $preference->value = $this->value; } else { return null; } return true; }