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