public function text($name) { $text = new Text($name); if (!is_null($value = $this->getValueFor($name))) { $text->value($value); } return $text; }