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