當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Form_Element_Password::setRenderPassword方法代碼示例

本文整理匯總了PHP中Zend_Form_Element_Password::setRenderPassword方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Form_Element_Password::setRenderPassword方法的具體用法?PHP Zend_Form_Element_Password::setRenderPassword怎麽用?PHP Zend_Form_Element_Password::setRenderPassword使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Form_Element_Password的用法示例。


在下文中一共展示了Zend_Form_Element_Password::setRenderPassword方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: init

 public function init()
 {
     $this->setName('registerForm');
     $this->setMethod('post');
     $this->setAction('/user/register/');
     $user = new Zend_Form_Element_Text('user');
     $user->setLabel('Username');
     $user->setRequired(true);
     $user->addValidator('Alnum', false);
     $user->addValidator('StringLength', true, array(3, 30));
     //$user->addValidator('Db_NoRecordExists', true, array('user', 'user') );
     $password = new Zend_Form_Element_Password('password');
     $password->setLabel('Password');
     $password->setRenderPassword(true);
     $password->setRequired(true);
     $password->addValidator('StringLength', true, array(5, 50));
     $name = new Zend_Form_Element_Text('name');
     $name->setLabel('Full Name');
     $name->setRequired(true);
     $name->addValidator('StringLength', true, array(3, 128));
     $email = new Zend_Form_Element_Text('email');
     $email->setLabel('Email');
     $email->setRequired(true);
     $email->addValidator('EmailAddress', true);
     $email->addValidator('StringLength', true, array(3, 128));
     $submit = new Zend_Form_Element_Submit('register');
     $submit->setLabel('Register');
     $hash = new Zend_Form_Element_Hash('hash');
     $this->setElements(array($user, $password, $name, $email, $submit, $hash));
 }
開發者ID:reveil,項目名稱:CodeTornado,代碼行數:30,代碼來源:RegisterForm.php

示例2: init

 public function init()
 {
     $this->setName('loginForm');
     $this->setMethod('post');
     $this->setAction('/user/login/');
     $user = new Zend_Form_Element_Text('user');
     $user->setLabel('Username');
     $user->setRequired(true);
     //$user->addValidator('Db_NoRecordExists', true, array('user', 'user') );
     $password = new Zend_Form_Element_Password('password');
     $password->setLabel('Password');
     $password->setRenderPassword(false);
     $password->setRequired(true);
     $submit = new Zend_Form_Element_Submit('login');
     $submit->setLabel('Login');
     //$hash = new Zend_Form_Element_Hash('hash');
     $this->setElements(array($user, $password, $submit));
 }
開發者ID:reveil,項目名稱:CodeTornado,代碼行數:18,代碼來源:LoginForm.php

示例3: getRepeatPasswordElement

 /**
  * Returns/sets a repeat password element.
  *
  * @return \Zend_Form_Element_Password
  */
 public function getRepeatPasswordElement()
 {
     $element = $this->getElement($this->_repeatPasswordFieldName);
     if (!$element) {
         // Field repeat password
         $element = new \Zend_Form_Element_Password($this->_repeatPasswordFieldName);
         $element->setLabel($this->_('Repeat password'));
         $element->setAttrib('size', 40);
         $element->setRequired(true);
         $element->setRenderPassword(true);
         $validator = new \MUtil_Validate_IsConfirmed($this->_newPasswordFieldName, $this->_('New password'));
         $validator->setMessage($this->_("Must be the same as %fieldDescription%."), \MUtil_Validate_IsConfirmed::NOT_SAME);
         $element->addValidator($validator);
         $this->addElement($element);
     }
     return $element;
 }
開發者ID:GemsTracker,項目名稱:gemstracker-library,代碼行數:22,代碼來源:ChangePasswordForm.php


注:本文中的Zend_Form_Element_Password::setRenderPassword方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。