[ Index ] |
|
Code source de phpMyVisites 2.3 |
1 <?php 2 /* vim: set expandtab tabstop=4 shiftwidth=4: */ 3 // +----------------------------------------------------------------------+ 4 // | PHP version 4.0 | 5 // +----------------------------------------------------------------------+ 6 // | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group | 7 // +----------------------------------------------------------------------+ 8 // | This source file is subject to version 2.0 of the PHP license, | 9 // | that is bundled with this package in the file LICENSE, and is | 10 // | available at through the world-wide-web at | 11 // | http://www.php.net/license/2_02.txt. | 12 // | If you did not receive a copy of the PHP license and are unable to | 13 // | obtain it through the world-wide-web, please send a note to | 14 // | license@php.net so we can mail you a copy immediately. | 15 // +----------------------------------------------------------------------+ 16 // | Authors: Adam Daniel <adaniel1@eesus.jnj.com> | 17 // | Bertrand Mansion <bmansion@mamasam.com> | 18 // +----------------------------------------------------------------------+ 19 // 20 21 require_once 'Html/QuickForm/static.php'; 22 23 /** 24 * HTML class for a link type field 25 * 26 * @author Adam Daniel <adaniel1@eesus.jnj.com> 27 * @author Bertrand Mansion <bmansion@mamasam.com> 28 * @version 1.0 29 * @since PHP4.04pl1 30 * @access public 31 */ 32 class HTML_QuickForm_link extends HTML_QuickForm_static 33 { 34 // {{{ properties 35 36 /** 37 * Link display text 38 * @var string 39 * @since 1.0 40 * @access private 41 */ 42 var $_text = ""; 43 44 // }}} 45 // {{{ constructor 46 47 /** 48 * Class constructor 49 * 50 * @param string $elementLabel (optional)Link label 51 * @param string $href (optional)Link href 52 * @param string $text (optional)Link display text 53 * @param mixed $attributes (optional)Either a typical HTML attribute string 54 * or an associative array 55 * @since 1.0 56 * @access public 57 * @return void 58 * @throws 59 */ 60 function HTML_QuickForm_link($elementName=null, $elementLabel=null, $href=null, $text=null, $attributes=null) 61 { 62 HTML_QuickForm_element::HTML_QuickForm_element($elementName, $elementLabel, $attributes); 63 $this->_persistantFreeze = false; 64 $this->_type = 'link'; 65 $this->setHref($href); 66 $this->_text = $text; 67 } //end constructor 68 69 // }}} 70 // {{{ setName() 71 72 /** 73 * Sets the input field name 74 * 75 * @param string $name Input field name attribute 76 * @since 1.0 77 * @access public 78 * @return void 79 * @throws 80 */ 81 function setName($name) 82 { 83 $this->updateAttributes(array('name'=>$name)); 84 } //end func setName 85 86 // }}} 87 // {{{ getName() 88 89 /** 90 * Returns the element name 91 * 92 * @since 1.0 93 * @access public 94 * @return string 95 * @throws 96 */ 97 function getName() 98 { 99 return $this->getAttribute('name'); 100 } //end func getName 101 102 // }}} 103 // {{{ setValue() 104 105 /** 106 * Sets value for textarea element 107 * 108 * @param string $value Value for password element 109 * @since 1.0 110 * @access public 111 * @return void 112 * @throws 113 */ 114 function setValue($value) 115 { 116 return; 117 } //end func setValue 118 119 // }}} 120 // {{{ getValue() 121 122 /** 123 * Returns the value of the form element 124 * 125 * @since 1.0 126 * @access public 127 * @return void 128 * @throws 129 */ 130 function getValue() 131 { 132 return; 133 } // end func getValue 134 135 136 // }}} 137 // {{{ setHref() 138 139 /** 140 * Sets the links href 141 * 142 * @param string $href 143 * @since 1.0 144 * @access public 145 * @return void 146 * @throws 147 */ 148 function setHref($href) 149 { 150 $this->updateAttributes(array('href'=>$href)); 151 } // end func setHref 152 153 // }}} 154 // {{{ toHtml() 155 156 /** 157 * Returns the textarea element in HTML 158 * 159 * @since 1.0 160 * @access public 161 * @return string 162 * @throws 163 */ 164 function toHtml() 165 { 166 $tabs = $this->_getTabs(); 167 $html = "$tabs<a".$this->_getAttrString($this->_attributes).">"; 168 $html .= $this->_text; 169 $html .= "</a>"; 170 return $html; 171 } //end func toHtml 172 173 // }}} 174 // {{{ getFrozenHtml() 175 176 /** 177 * Returns the value of field without HTML tags (in this case, value is changed to a mask) 178 * 179 * @since 1.0 180 * @access public 181 * @return string 182 * @throws 183 */ 184 function getFrozenHtml() 185 { 186 return; 187 } //end func getFrozenHtml 188 189 // }}} 190 191 } //end class HTML_QuickForm_textarea 192 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 14:10:01 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |