Changeset 13567


Ignore:
Timestamp:
2007/05/29 02:16:38 (17 years ago)
Author:
adati
Message:
 
Location:
branches/dev/html/test/adachi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/dev/html/test/adachi/SC_FormParamsManager.php

    r13566 r13567  
    88 
    99class SC_FormParamsManager { 
    10     var $_objQuery; 
    11     var $_objValidate; 
    1210    var $_arrParamsInfo; 
    13     var $_arrInputDBData; 
    1411    var $_arrErr; 
    1512     
    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(); 
    2116         
    2217        if (count($arrParams) > 0 && count($arrParamsInfo) > 0) { 
     
    3530    } 
    3631     
     32    function setGroups($arrGroup){ 
     33        $this->_groups = $arrGroup; 
     34    } 
     35     
     36    function getGroups(){ 
     37        return $this->_groups; 
     38    } 
     39     
     40     
    3741    function validate(){ 
    38         $arrGroups = array(); 
    39         $arrParentAndChild = array(); 
     42        $arrGroups = array();    // Ê£¿ô¹àÌÜ¥Á¥§¥Ã¥¯ÍÑ 
     43        $arrParent = array();    // ¾å°Ì¹àÌÜ¥Á¥§¥Ã¥¯ÍÑ 
    4044         
    41         // Single Validation 
     45         
    4246        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            } 
    4558             
    4659            $arrValidateType = $objParam->getValidateType(); 
    4760             
     61            // Single Validation 
    4862            foreach ($arrValidateType as $method => $args) { 
    4963                $objValidator = SC_Validate::factory($method, $args); 
     
    6276            } 
    6377        } 
     78         
     79        // ¿Æ»Ò validation 
    6480    } 
    6581    function getEM(){ 
  • branches/dev/html/test/adachi/SC_Param.php

    r13566 r13567  
    1111    var $_convertType; 
    1212    var $_validateType; 
     13    var $_error; 
    1314     
    1415    function SC_Param($arrParamInfo){ 
Note: See TracChangeset for help on using the changeset viewer.