Ignore:
Timestamp:
2013/02/18 19:09:54 (13 years ago)
Author:
shutta
Message:

#2043 (typo修正・ソース整形・ソースコメントの改善 for 2.12.4)
Zend Framework PHP 標準コーディング規約のコーディングスタイルへ準拠。
classおよびfunctionの開始波括弧「{」のスタイルを修正。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/SC_Product.php

    r22507 r22567  
    2929 * @version $Id$ 
    3030 */ 
    31 class SC_Product { 
     31class SC_Product  
     32{ 
    3233 
    3334    /** 規格名一覧 */ 
     
    6061     * @return void 
    6162     */ 
    62     function setProductsOrder($col, $table = 'dtb_products', $order = 'ASC') { 
     63    function setProductsOrder($col, $table = 'dtb_products', $order = 'ASC') 
     64    { 
    6365        $this->arrOrderData = array('col' => $col, 'table' => $table, 'order' => $order); 
    6466    } 
     
    7375     * @return array 商品IDの配列 
    7476     */ 
    75     function findProductIdsOrder(&$objQuery, $arrVal = array()) { 
     77    function findProductIdsOrder(&$objQuery, $arrVal = array()) 
     78    { 
    7679        $table = 'dtb_products AS alldtl'; 
    7780 
     
    107110     * @return array 対象商品ID数 
    108111     */ 
    109     function findProductCount(&$objQuery, $arrVal = array()) { 
     112    function findProductCount(&$objQuery, $arrVal = array()) 
     113    { 
    110114        $table = 'dtb_products AS alldtl'; 
    111115 
     
    123127     * @return array 商品一覧の配列 
    124128     */ 
    125     function lists(&$objQuery) { 
     129    function lists(&$objQuery) 
     130    { 
    126131        $col = <<< __EOS__ 
    127132             product_id 
     
    165170     * @return array 商品一覧の配列 (キー: 商品ID) 
    166171     */ 
    167     function getListByProductIds(&$objQuery, $arrProductId = array()) { 
     172    function getListByProductIds(&$objQuery, $arrProductId = array()) 
     173    { 
    168174        if (empty($arrProductId)) { 
    169175            return array(); 
     
    206212     * @return array 商品詳細情報の配列 
    207213     */ 
    208     function getDetail($productId) { 
     214    function getDetail($productId) 
     215    { 
    209216        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    210217        $arrProduct = $objQuery->getRow('*', $this->alldtlSQL('product_id = ?'), 
     
    225232     * @return array 商品詳細情報と商品規格の配列 
    226233     */ 
    227     function getDetailAndProductsClass($productClassId) { 
     234    function getDetailAndProductsClass($productClassId) 
     235    { 
    228236        $result = $this->getProductsClass($productClassId); 
    229237        $result = array_merge($result, $this->getDetail($result['product_id'])); 
     
    242250     * @return void 
    243251     */ 
    244     function setProductsClassByProductIds($arrProductId, $has_deleted = false) { 
     252    function setProductsClassByProductIds($arrProductId, $has_deleted = false) 
     253    { 
    245254 
    246255        foreach ($arrProductId as $productId) { 
     
    344353     * @return array 商品規格の配列 
    345354     */ 
    346     function getProductsClassByQuery(&$objQuery, $params) { 
     355    function getProductsClassByQuery(&$objQuery, $params) 
     356    { 
    347357        // 末端の規格を取得 
    348358        $col = <<< __EOS__ 
     
    397407     * @return array 商品規格の配列 
    398408     */ 
    399     function getProductsClass($productClassId) { 
     409    function getProductsClass($productClassId) 
     410    { 
    400411        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    401412        $objQuery->setWhere('product_class_id = ? AND T1.del_flg = 0'); 
     
    412423     * @return array 商品規格の配列 
    413424     */ 
    414     function getProductsClassByProductIds($productIds = array(), $has_deleted = false) { 
     425    function getProductsClassByProductIds($productIds = array(), $has_deleted = false) 
     426    { 
    415427        if (empty($productIds)) { 
    416428            return array(); 
     
    433445     * @return array すべての組み合わせの商品規格の配列 
    434446     */ 
    435     function getProductsClassFullByProductId($productId, $has_deleted = false) { 
     447    function getProductsClassFullByProductId($productId, $has_deleted = false) 
     448    { 
    436449        $arrRet = $this->getProductsClassByProductIds(array($productId), $has_deleted); 
    437450 
     
    445458     * @return array 商品IDをキーにした商品ステータスIDの配列 
    446459     */ 
    447     function getProductStatus($productIds) { 
     460    function getProductStatus($productIds) 
     461    { 
    448462        if (empty($productIds)) { 
    449463            return array(); 
     
    470484     * @param array $productStatusIds ON にする商品ステータスIDの配列 
    471485     */ 
    472     function setProductStatus($productId, $productStatusIds) { 
     486    function setProductStatus($productId, $productStatusIds) 
     487    { 
    473488 
    474489        $val['product_id'] = $productId; 
     
    496511     * @see getDetailAndProductsClass() 
    497512     */ 
    498     function getBuyLimit($p) { 
     513    function getBuyLimit($p) 
     514    { 
    499515        $limit = null; 
    500516        if ($p['stock_unlimited'] != '1' && is_numeric($p['sale_limit'])) { 
     
    521537     * @return boolean 在庫の減少に成功した場合 true; 失敗した場合 false 
    522538     */ 
    523     function reduceStock($productClassId, $quantity) { 
     539    function reduceStock($productClassId, $quantity) 
     540    { 
    524541 
    525542        if ($quantity == 0) { 
     
    549566     * @return array 旧バージョン互換用のデータ 
    550567     */ 
    551     static function setPriceTaxTo(&$arrProducts) { 
     568    static function setPriceTaxTo(&$arrProducts) 
     569    { 
    552570        foreach ($arrProducts as &$arrProduct) { 
    553571            $arrProduct['price01_min_format'] = number_format($arrProduct['price01_min']); 
     
    583601     * @return void 
    584602     */ 
    585     static function setIncTaxToProducts(&$arrProducts) { 
     603    static function setIncTaxToProducts(&$arrProducts) 
     604    { 
    586605        foreach ($arrProducts as &$arrProduct) { 
    587606            SC_Product_Ex::setIncTaxToProduct($arrProduct); 
     
    595614     * @return void 
    596615     */ 
    597     static function setIncTaxToProduct(&$arrProduct) { 
     616    static function setIncTaxToProduct(&$arrProduct) 
     617    { 
    598618        $arrProduct['price01_min_inctax'] = isset($arrProduct['price01_min']) ? SC_Helper_DB_Ex::sfCalcIncTax($arrProduct['price01_min']) : null; 
    599619        $arrProduct['price01_max_inctax'] = isset($arrProduct['price01_max']) ? SC_Helper_DB_Ex::sfCalcIncTax($arrProduct['price01_max']) : null; 
     
    608628     * @return string 商品詳細の SQL 
    609629     */ 
    610     function alldtlSQL($where_products_class = '') { 
     630    function alldtlSQL($where_products_class = '') 
     631    { 
    611632        if (!SC_Utils_Ex::isBlank($where_products_class)) { 
    612633            $where_products_class = 'AND (' . $where_products_class . ')'; 
     
    715736     * @return string 商品規格詳細の SQL 
    716737     */ 
    717     function prdclsSQL($where = '') { 
     738    function prdclsSQL($where = '') 
     739    { 
    718740        $where_clause = ''; 
    719741        if (!SC_Utils_Ex::isBlank($where)) { 
Note: See TracChangeset for help on using the changeset viewer.