• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • Examples
  • File List

E:/E/GEAMP/www/openbiz/openbiz/others/Zend/View/Helper/FormPassword.php

00001 <?php
00027 require_once 'Zend/View/Helper/FormElement.php';
00028 
00029 
00039 class Zend_View_Helper_FormPassword extends Zend_View_Helper_FormElement
00040 {
00056     public function formPassword($name, $value = null, $attribs = null)
00057     {
00058         $info = $this->_getInfo($name, $value, $attribs);
00059         extract($info); // name, value, attribs, options, listsep, disable
00060 
00061         // is it disabled?
00062         $disabled = '';
00063         if ($disable) {
00064             // disabled
00065             $disabled = ' disabled="disabled"';
00066         }
00067 
00068         // determine the XHTML value
00069         $valueString = ' value=""';
00070         if (array_key_exists('renderPassword', $attribs)) {
00071             if ($attribs['renderPassword']) {
00072                 $valueString = ' value="' . $this->view->escape($value) . '"';
00073             }
00074             unset($attribs['renderPassword']);
00075         }
00076 
00077         // XHTML or HTML end tag?
00078         $endTag = ' />';
00079         if (($this->view instanceof Zend_View_Abstract) && !$this->view->doctype()->isXhtml()) {
00080             $endTag= '>';
00081         }
00082 
00083         // render the element
00084         $xhtml = '<input type="password"'
00085                 . ' name="' . $this->view->escape($name) . '"'
00086                 . ' id="' . $this->view->escape($id) . '"'
00087                 . $valueString
00088                 . $disabled
00089                 . $this->_htmlAttribs($attribs)
00090                 . $endTag;
00091 
00092         return $xhtml;
00093     }
00094 
00095 }

Generated on Thu Apr 19 2012 17:01:18 for openbiz by  doxygen 1.7.2