Changeset 13567
- Timestamp:
- 2007/05/29 02:16:38 (17 years ago)
- Location:
- branches/dev/html/test/adachi
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/dev/html/test/adachi/SC_FormParamsManager.php
r13566 r13567 8 8 9 9 class SC_FormParamsManager { 10 var $_objQuery;11 var $_objValidate;12 10 var $_arrParamsInfo; 13 var $_arrInputDBData;14 11 var $_arrErr; 15 12 16 function SC_FormParamsManager($arrParams = array(), $arrParamsInfo = array()){ 17 $this->_objQuery = new SC_Query(); 18 $this->_objValidate = new SC_Validate(); 19 $this->_arrParamsInfo = array(); 20 $this->_arrInputDBData = array(); 13 function SC_FormParamsManager($arrParams, $arrParamsInfo){ 14 $this->_arrParamsInfo = array(); 15 $this->_arrErr = array(); 21 16 22 17 if (count($arrParams) > 0 && count($arrParamsInfo) > 0) { … … 35 30 } 36 31 32 function setGroups($arrGroup){ 33 $this->_groups = $arrGroup; 34 } 35 36 function getGroups(){ 37 return $this->_groups; 38 } 39 40 37 41 function validate(){ 38 $arrGroups = array(); 39 $arrParent AndChild = array();42 $arrGroups = array(); // Ê£¿ô¹àÌÜ¥Á¥§¥Ã¥¯ÍÑ 43 $arrParent = array(); // ¾å°Ì¹àÌÜ¥Á¥§¥Ã¥¯ÍÑ 40 44 41 // Single Validation45 42 46 foreach ($this->_arrParamsInfo as $_key => $objParam) { 43 $objParam->has_group() ? $arrGroups[$objParam->getGroup()][$_key] = $objParam; 44 $arrParentAndChild 47 // Ê£¿ô¹àÌÜ¥Á¥§¥Ã¥¯ÍÑÇÛÎó¤ò¹½ÃÛ 48 if ($objParam->has_group()) { $arrGroups[$objParam->getGroup()][$_key] = $objParam; } 49 50 // ¾å°Ì¹àÌÜ¥Á¥§¥Ã¥¯ 51 if ($objParam->has_parent()) { 52 $has_parent = true; 53 while ($has_parent) { 54 if ($this->_arrParamsInfo[$objParam->getParent()]->has_parent()) { 55 56 } 57 } 45 58 46 59 $arrValidateType = $objParam->getValidateType(); 47 60 61 // Single Validation 48 62 foreach ($arrValidateType as $method => $args) { 49 63 $objValidator = SC_Validate::factory($method, $args); … … 62 76 } 63 77 } 78 79 // ¿Æ»Ò validation 64 80 } 65 81 function getEM(){ -
branches/dev/html/test/adachi/SC_Param.php
r13566 r13567 11 11 var $_convertType; 12 12 var $_validateType; 13 var $_error; 13 14 14 15 function SC_Param($arrParamInfo){
Note: See TracChangeset
for help on using the changeset viewer.