当前位置: 首页>>代码示例>>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;未经允许,请勿转载。