public function setValue($value) { if (is_array($value)) { $this->nestChildren($value); } else { $this->value = $value; } return $this; }