source: branches/beta/html/test/adachi/SC_Param.php @ 14676

Revision 14676, 1.3 KB checked in by adati, 17 years ago (diff)

1.4.0a-betaのマージ

Line 
1<?php
2/**
3 * ¸Ä¡¹¤Î¥Ñ¥é¥á¡¼¥¿¤ò´ÉÍý¤¹¤ë¥¯¥é¥¹
4 */
5class SC_Param {
6    var $_keyname;
7    var $_dispname;
8    var $_value;
9    var $_group;
10    var $_parent;
11    var $_file;
12    var $_convert;
13    var $_validate;
14    var $_javascript;
15   
16    function SC_Param($arrParamInfo){
17        $this->_init($arrParamInfo);
18    }
19   
20    function _init($arrParamInfo){
21        $arrProperties = array_keys(get_object_vars($this));
22       
23        foreach ($arrProperties as $property) {
24            $this->$property = isset($arrParamInfo[$property])
25                ? $this->$property = $arrParamInfo[preg_replace('/^_/', '', $property)]
26                : $this->$property = null;
27        }
28    }
29   
30    function getEscapeValue($CHAR_CODE = CHAR_CODE){
31        return htmlspecialchars($this->_value, ENT_QUOTES, $CHAR_CODE);
32    }
33   
34    function getValue(){
35        return $this->_value;
36    }
37   
38    function convert(){
39        $this->_value = mb_convert_kana($this->_value, $this->$_convert);
40    }
41   
42    function getKeyName(){
43        return $this->_keyname;
44    }
45   
46    function getDispName(){
47        return $this->_dispname;
48    }
49   
50    function is_file(){
51        return $this->_file == true ? true : false;
52    }
53   
54}
55?>
Note: See TracBrowser for help on using the repository browser.