Changeset 13742 for branches/dev
- Timestamp:
- 2007/05/30 00:14:16 (19 years ago)
- File:
-
- 1 edited
-
branches/dev/html/test/adachi/SC_Param.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/dev/html/test/adachi/SC_Param.php
r13567 r13742 4 4 */ 5 5 class SC_Param { 6 var $_name; 6 var $_keyname; 7 var $_dispname 7 8 var $_value; 8 9 var $_group; 9 10 var $_parent; 10 11 var $_file; 11 var $_convert Type;12 var $_validate Type;13 var $_ error;12 var $_convert; 13 var $_validate; 14 var $_javascript; 14 15 15 16 function SC_Param($arrParamInfo){ 16 $this-> init($arrParamInfo);17 $this->_init($arrParamInfo); 17 18 } 18 19 19 function init($arrParamInfo){ 20 $arrProperties = array( 21 'name', 'value', 'group', 'child', 'parent', 22 'file', 'convertType', 'validateType' 23 ); 20 function _init($arrParamInfo){ 21 $arrProperties = array_keys(get_object_vars($this)); 24 22 25 23 foreach ($arrProperties as $property) { 26 $this->$property 27 = isset($arrParamInfo[$property]) ? $arrParamInfo[$property] : null; 24 $this->$property = isset($arrParamInfo[$property]) 25 ? $arrParamInfo[preg_replace('/^_/', '', $property)] 26 : null; 28 27 } 29 28 } 30 29 31 function getEscapeValue( ){32 return htmlspecialchars($this->_value, ENT_QUOTES, CHAR_CODE));30 function getEscapeValue($CHAR_CODE = CHAR_CODE){ 31 return htmlspecialchars($this->_value, ENT_QUOTES, $CHAR_CODE); 33 32 } 34 33 … … 38 37 39 38 function convert(){ 40 $this->_value = mb_convert_kana($this->_value, $this->$_convert Type);39 $this->_value = mb_convert_kana($this->_value, $this->$_convert); 41 40 } 42 41 43 function getName(){ 44 return $this->_Name; 42 function getKeyName(){ 43 return $this->_keyname; 44 } 45 46 function getDispName(){ 47 return $this->_dispname; 45 48 } 46 49 … … 49 52 } 50 53 51 }52 54 } 53 55 ?>
Note: See TracChangeset
for help on using the changeset viewer.
