Changeset 20158


Ignore:
Timestamp:
2011/02/12 19:44:40 (11 years ago)
Author:
kimoto
Message:

LC_Page_Mypage_DownLoad リファクタリング

  • sendResponseが特殊すぎる為そこは触っていません
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_DownLoad.php

    r20116 r20158  
    7676 
    7777        // パラメータチェック 
    78         $this->objFormParam = new SC_FormParam(); 
    79         $this->lfInitParam(); 
     78        $objFormParam = new SC_FormParam(); 
     79        $this->lfInitParam($objFormParam); 
    8080        // GET、SESSION['customer']値の取得 
    81         $this->objFormParam->setParam($_SESSION['customer']); 
    82         $this->objFormParam->setParam($_GET); 
    83         $this->arrErr = $this->lfCheckError(); 
     81        $objFormParam->setParam($_SESSION['customer']); 
     82        $objFormParam->setParam($_GET); 
     83        $this->arrErr = $this->lfCheckError($objFormParam); 
    8484        if (count($this->arrErr)!=0){ 
    8585            SC_Utils_Ex::sfDispSiteError(DOWNFILE_NOT_FOUND,"",true); 
     
    8989    /** 
    9090     * Page のResponse. 
     91     * 
     92     * todo たいした処理でないのに異常に処理が重い 
    9193     * @return void 
    9294     */ 
     
    191193 
    192194    /* パラメータ情報の初期化 */ 
    193     function lfInitParam() { 
    194         $this->objFormParam->addParam("customer_id", "customer_id", INT_LEN, "n", array("EXIST_CHECK","NUM_CHECK")); 
    195         $this->objFormParam->addParam("order_id", "order_id", INT_LEN, "n", array("EXIST_CHECK", "NUM_CHECK")); 
    196         $this->objFormParam->addParam("product_id", "product_id", INT_LEN, "n", array("EXIST_CHECK","NUM_CHECK")); 
    197         $this->objFormParam->addParam("product_class_id", "product_class_id", INT_LEN, "n", array("EXIST_CHECK","NUM_CHECK")); 
     195    function lfInitParam(&$objFormParam) { 
     196        $objFormParam->addParam("customer_id", "customer_id", INT_LEN, "n", array("EXIST_CHECK","NUM_CHECK")); 
     197        $objFormParam->addParam("order_id", "order_id", INT_LEN, "n", array("EXIST_CHECK", "NUM_CHECK")); 
     198        $objFormParam->addParam("product_id", "product_id", INT_LEN, "n", array("EXIST_CHECK","NUM_CHECK")); 
     199        $objFormParam->addParam("product_class_id", "product_class_id", INT_LEN, "n", array("EXIST_CHECK","NUM_CHECK")); 
    198200    } 
    199201 
    200202    /* 入力内容のチェック */ 
    201     function lfCheckError() { 
    202         // 入力データを渡す。 
    203         $arrRet = $this->objFormParam->getHashArray(); 
    204         $objErr = new SC_CheckError($arrRet); 
    205         $objErr->arrErr = $this->objFormParam->checkError(); 
     203    function lfCheckError(&$objFormParam) { 
     204        $objErr = new SC_CheckError($objFormParam->getHashArray()); 
     205        $objErr->arrErr = $objFormParam->checkError(); 
    206206        return $objErr->arrErr; 
    207207    } 
Note: See TracChangeset for help on using the changeset viewer.