Cnz_Html
[ class tree: Cnz_Html ] [ index: Cnz_Html ] [ all elements ]

Source for file Password.php

Documentation is available at Password.php

  1. <?php
  2. /**
  3.  * CNZ Framework
  4.  *
  5.  * A Framework for Creating and Using Complex Web Elements
  6.  *
  7.  * The purpose of this framework is to provide a library of high-level objects
  8.  * to facilitate common HTML coding tasks, such as menus, tables, and forms.
  9.  * The intent is to reduce repetitive HTML coding as much as possible, replacing
  10.  * it with a combination of configuration files and style sheets with
  11.  * standardized naming conventions.
  12.  *
  13.  * This framework is built on and requires the
  14.  * {@link http://framework.zend.com/ Zend Framework}.
  15.  *
  16.  * @category   Cnz
  17.  * @package    Cnz_Html
  18.  * @subpackage Form
  19.  *
  20.  * @author    Lyle Frost <lfrost@cnz.com>
  21.  * @copyright Copyright (c) 2006-2007 Citadel Network <{@link http://www.citadelnetwork.com/}>
  22.  * @filesource
  23.  * @license   http://www.citadelnetwork.com/license/cnzframework New BSD License
  24.  * @version   $Id: Password.php 27 2007-07-19 18:47:54Z lfrost $
  25.  */
  26.  
  27. /**
  28.  * Required classes.
  29.  *
  30.  * @ignore
  31.  */
  32. Zend_Loader::loadClass('Cnz_Html_Form_Item');
  33.  
  34. /**
  35.  * HTML Form Password class
  36.  *
  37.  * This class automates the creation and display of a password field.
  38.  *
  39.  * Example INI:
  40.  *
  41.  * <pre><samp>
  42.  * item.password.label = Password
  43.  * item.password.type  = password
  44.  * </samp></pre>
  45.  *
  46.  * @category   Cnz
  47.  * @package    Cnz_Html
  48.  * @subpackage Form
  49.  */
  50. {
  51.     /* Methods ===========================================================*/
  52.  
  53.     /**
  54.      * Option fields:
  55.      *   none
  56.      *
  57.      * Configuration fields:
  58.      *   none
  59.      *
  60.      * @param array       $options Options
  61.      * @param Zend_Config $config  Configuration
  62.      */
  63.     public function __construct(array $options array()Zend_Config $config NULL)
  64.     {
  65.         parent::__construct($options$config);
  66.         return;
  67.     }
  68.  
  69.     /**
  70.      * @param  string $style Value for outermost style attribute
  71.      * @return void 
  72.      */
  73.     public function display($style NULL)
  74.     {
  75.         $indent Cnz_Html::indentGenerate();
  76.  
  77.         echo $indent'<div class = "'$this->genStyles('label')'"><label for = "'$this->genId()'">'empty($this->label'&nbsp;' $this->label'</label></div>'"\n";
  78.         echo $indent'<div class = "'$this->genStyles('field')'">';
  79.         echo '<input id = "'$this->genId()'" name = "'$this->name'" type = "password"';
  80.         echo '/>';
  81.         echo '</div>'"\n";
  82.  
  83.         return;
  84.     }
  85. }

Documentation generated on Thu, 19 Jul 2007 15:02:13 -0400 by phpDocumentor 1.4.0RC2