00001 <?php
00027 require_once 'Zend/View/Helper/FormElement.php';
00028
00029
00039 class Zend_View_Helper_FormText extends Zend_View_Helper_FormElement
00040 {
00056 public function formText($name, $value = null, $attribs = null)
00057 {
00058 $info = $this->_getInfo($name, $value, $attribs);
00059 extract($info);
00060
00061
00062 $disabled = '';
00063 if ($disable) {
00064
00065 $disabled = ' disabled="disabled"';
00066 }
00067
00068
00069 $endTag = ' />';
00070 if (($this->view instanceof Zend_View_Abstract) && !$this->view->doctype()->isXhtml()) {
00071 $endTag= '>';
00072 }
00073
00074 $xhtml = '<input type="text"'
00075 . ' name="' . $this->view->escape($name) . '"'
00076 . ' id="' . $this->view->escape($id) . '"'
00077 . ' value="' . $this->view->escape($value) . '"'
00078 . $disabled
00079 . $this->_htmlAttribs($attribs)
00080 . $endTag;
00081
00082 return $xhtml;
00083 }
00084 }