Ignore:
Timestamp:
2013/02/18 19:09:54 (10 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/helper/SC_Helper_DB.php

    r22487 r22567  
    2929 * @version $Id:SC_Helper_DB.php 15532 2007-08-31 14:39:46Z nanasess $ 
    3030 */ 
    31 class SC_Helper_DB { 
     31class SC_Helper_DB  
     32{ 
    3233 
    3334    // {{{ properties 
     
    6465     *               引数 $add == false でカラムが存在しない場合 false 
    6566     */ 
    66     function sfColumnExists($table_name, $col_name, $col_type = '', $dsn = '', $add = false) { 
     67    function sfColumnExists($table_name, $col_name, $col_type = '', $dsn = '', $add = false) 
     68    { 
    6769        $dbFactory = SC_DB_DBFactory_Ex::getInstance(); 
    6870        $dsn = $dbFactory->getDSN($dsn); 
     
    102104     *               $add == false で, データが存在しない場合 false 
    103105     */ 
    104     function sfDataExists($table_name, $where, $arrWhereVal, $dsn = '', $sql = '', $add = false) { 
     106    function sfDataExists($table_name, $where, $arrWhereVal, $dsn = '', $sql = '', $add = false) 
     107    { 
    105108        $dbFactory = SC_DB_DBFactory_Ex::getInstance(); 
    106109        $dsn = $dbFactory->getDSN($dsn); 
     
    131134     * @return array 店舗基本情報の配列 
    132135     */ 
    133     function sfGetBasisData($force = false, $col = '') { 
     136    function sfGetBasisData($force = false, $col = '') 
     137    { 
    134138        static $data = array(); 
    135139 
     
    158162     * @return array 店舗基本情報の配列 
    159163     */ 
    160     function sfGetBasisDataCache($generate = false){ 
     164    function sfGetBasisDataCache($generate = false) 
     165    { 
    161166        // テーブル名 
    162167        $name = 'dtb_baseinfo'; 
     
    190195     * @return bool キャッシュデータファイル生成結果 
    191196     */ 
    192     function sfCreateBasisDataCache() { 
     197    function sfCreateBasisDataCache() 
     198    { 
    193199        // テーブル名 
    194200        $name = 'dtb_baseinfo'; 
     
    223229     * @deprecated 
    224230     */ 
    225     function sfGetBasisCount() { 
     231    function sfGetBasisCount() 
     232    { 
    226233        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    227234 
     
    234241     * @return boolean 有無 
    235242     */ 
    236     function sfGetBasisExists() { 
     243    function sfGetBasisExists() 
     244    { 
    237245        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    238246 
     
    241249 
    242250    /* 選択中のアイテムのルートカテゴリIDを取得する */ 
    243     function sfGetRootId() { 
     251    function sfGetRootId() 
     252    { 
    244253 
    245254        if (!$this->g_root_on) { 
     
    277286     * @return array オーダー前ポイントの配列 
    278287     */ 
    279     function sfGetRollbackPoint($order_id, $use_point, $add_point, $order_status) { 
     288    function sfGetRollbackPoint($order_id, $use_point, $add_point, $order_status) 
     289    { 
    280290        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    281291        $arrRet = $objQuery->select('customer_id', 'dtb_order', 'order_id = ?', array($order_id)); 
     
    309319     * @return array カテゴリツリーの配列 
    310320     */ 
    311     function sfGetCatTree($parent_category_id, $count_check = false) { 
     321    function sfGetCatTree($parent_category_id, $count_check = false) 
     322    { 
    312323        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    313324        $col = ''; 
     
    355366     * @see sfGetCatTree() 
    356367     */ 
    357     function findTree(&$arrTree, $parent, &$result) { 
     368    function findTree(&$arrTree, $parent, &$result) 
     369    { 
    358370        if ($result[count($result) - 1]['parent_category_id'] === 0) { 
    359371            return; 
     
    379391     * @return array カテゴリツリーの配列 
    380392     */ 
    381     function sfGetMultiCatTree($product_id, $count_check = false) { 
     393    function sfGetMultiCatTree($product_id, $count_check = false) 
     394    { 
    382395        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    383396        $col = ''; 
     
    427440     * @return string 親カテゴリを連結した文字列 
    428441     */ 
    429     function sfGetCatCombName($category_id) { 
     442    function sfGetCatCombName($category_id) 
     443    { 
    430444        // 商品が属するカテゴリIDを縦に取得 
    431445        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     
    452466     * @return array 指定したカテゴリIDのカテゴリ 
    453467     */ 
    454     function sfGetCat($category_id) { 
     468    function sfGetCat($category_id) 
     469    { 
    455470        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    456471 
     
    468483     * @return array 指定したカテゴリIDの大カテゴリ 
    469484     */ 
    470     function sfGetFirstCat($category_id) { 
     485    function sfGetFirstCat($category_id) 
     486    { 
    471487        // 商品が属するカテゴリIDを縦に取得 
    472488        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     
    493509     * @return array カテゴリツリーの配列 
    494510     */ 
    495     function sfGetCategoryList($addwhere = '', $products_check = false, $head = CATEGORY_HEAD) { 
     511    function sfGetCategoryList($addwhere = '', $products_check = false, $head = CATEGORY_HEAD) 
     512    { 
    496513        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    497514        $where = 'del_flg = 0'; 
     
    532549     * @return array カテゴリツリーの配列 
    533550     */ 
    534     function sfGetLevelCatList($parent_zero = true) { 
     551    function sfGetLevelCatList($parent_zero = true) 
     552    { 
    535553        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    536554 
     
    581599     * 
    582600     */ 
    583     function sfGetCategoryId($product_id, $category_id = 0, $closed = false) { 
     601    function sfGetCategoryId($product_id, $category_id = 0, $closed = false) 
     602    { 
    584603        if ($closed) { 
    585604            $status = ''; 
     
    608627     * @return void 
    609628     */ 
    610     function addProductBeforCategories($category_id, $product_id) { 
     629    function addProductBeforCategories($category_id, $product_id) 
     630    { 
    611631        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    612632 
     
    629649     * @return void 
    630650     */ 
    631     function addProductAfterCategories($category_id, $product_id) { 
     651    function addProductAfterCategories($category_id, $product_id) 
     652    { 
    632653        $sqlval = array('category_id' => $category_id, 
    633654                        'product_id' => $product_id); 
     
    661682     * @return void 
    662683     */ 
    663     function removeProductByCategories($category_id, $product_id) { 
     684    function removeProductByCategories($category_id, $product_id) 
     685    { 
    664686        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    665687        $objQuery->delete('dtb_product_categories', 
     
    674696     * @return void 
    675697     */ 
    676     function updateProductCategories($arrCategory_id, $product_id) { 
     698    function updateProductCategories($arrCategory_id, $product_id) 
     699    { 
    677700        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    678701 
     
    707730     * @return void 
    708731     */ 
    709     function sfCountCategory($objQuery = NULL, $is_force_all_count = false) { 
     732    function sfCountCategory($objQuery = NULL, $is_force_all_count = false) 
     733    { 
    710734        $objProduct = new SC_Product_Ex(); 
    711735 
     
    884908     * @param array 子ID の配列 
    885909     */ 
    886     function sfGetChildsID($table, $pid_name, $id_name, $id) { 
     910    function sfGetChildsID($table, $pid_name, $id_name, $id) 
     911    { 
    887912        $arrRet = $this->sfGetChildrenArray($table, $pid_name, $id_name, $id); 
    888913        return $arrRet; 
     
    898923     * @return array 子IDの配列 
    899924     */ 
    900     function sfGetChildrenArray($table, $pid_name, $id_name, $id) { 
     925    function sfGetChildrenArray($table, $pid_name, $id_name, $id) 
     926    { 
    901927        $arrChildren = array(); 
    902928        $arrRet = array($id); 
     
    919945     * @return array 子IDの配列 
    920946     */ 
    921     function sfGetChildrenArraySub($table, $pid_name, $id_name, $arrPID) { 
     947    function sfGetChildrenArraySub($table, $pid_name, $id_name, $arrPID) 
     948    { 
    922949        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    923950 
     
    939966     * @return array 親IDの配列 
    940967     */ 
    941     function sfGetParents($table, $pid_name, $id_name, $id) { 
     968    function sfGetParents($table, $pid_name, $id_name, $id) 
     969    { 
    942970        $arrRet = SC_Helper_DB_Ex::sfGetParentsArray($table, $pid_name, $id_name, $id); 
    943971        return $arrRet; 
     
    953981     * @return array 親IDの配列 
    954982     */ 
    955     function sfGetParentsArray($table, $pid_name, $id_name, $id) { 
     983    function sfGetParentsArray($table, $pid_name, $id_name, $id) 
     984    { 
    956985        $arrParents = array(); 
    957986        $ret = $id; 
     
    968997 
    969998    /* 子ID所属する親IDを取得する */ 
    970     function sfGetParentsArraySub($table, $pid_name, $id_name, $child) { 
     999    function sfGetParentsArraySub($table, $pid_name, $id_name, $child) 
     1000    { 
    9711001        if (SC_Utils_Ex::isBlank($child)) { 
    9721002            return false; 
     
    9861016     * @return array 商品を検索する場合の配列 
    9871017     */ 
    988     function sfGetCatWhere($category_id) { 
     1018    function sfGetCatWhere($category_id) 
     1019    { 
    9891020        // 子カテゴリIDの取得 
    9901021        $arrRet = SC_Helper_DB_Ex::sfGetChildrenArray('dtb_category', 'parent_category_id', 'category_id', $category_id); 
     
    10051036     * @return array SELECT ボックス用リストの配列 
    10061037     */ 
    1007     function sfGetIDValueList($table, $keyname, $valname, $where = '', $arrVal = array()) { 
     1038    function sfGetIDValueList($table, $keyname, $valname, $where = '', $arrVal = array()) 
     1039    { 
    10081040        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    10091041        $col = "$keyname, $valname"; 
     
    10301062     * @return void 
    10311063     */ 
    1032     function sfRankUp($table, $colname, $id, $andwhere = '') { 
     1064    function sfRankUp($table, $colname, $id, $andwhere = '') 
     1065    { 
    10331066        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    10341067        $objQuery->begin(); 
     
    10811114     * @return void 
    10821115     */ 
    1083     function sfRankDown($table, $colname, $id, $andwhere = '') { 
     1116    function sfRankDown($table, $colname, $id, $andwhere = '') 
     1117    { 
    10841118        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    10851119        $objQuery->begin(); 
     
    11321166     * @return void 
    11331167     */ 
    1134     function sfMoveRank($tableName, $keyIdColumn, $keyId, $pos, $where = '') { 
     1168    function sfMoveRank($tableName, $keyIdColumn, $keyId, $pos, $where = '') 
     1169    { 
    11351170        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    11361171        $objQuery->begin(); 
     
    12591294     * @return array 特定のカラムの配列 
    12601295     */ 
    1261     function sfGetParentsCol($objQuery, $table, $id_name, $col_name, $arrId) { 
     1296    function sfGetParentsCol($objQuery, $table, $id_name, $col_name, $arrId) 
     1297    { 
    12621298        $col = $col_name; 
    12631299        $len = count($arrId); 
     
    12911327     * @return void 
    12921328     */ 
    1293     function sfMoveCatRank($objQuery, $table, $id_name, $cat_name, $old_catid, $new_catid, $id) { 
     1329    function sfMoveCatRank($objQuery, $table, $id_name, $cat_name, $old_catid, $new_catid, $id) 
     1330    { 
    12941331        if ($old_catid == $new_catid) { 
    12951332            return; 
     
    13301367     * @return bool レコードが存在する場合 true 
    13311368     */ 
    1332     function sfIsRecord($table, $col, $arrVal, $addwhere = '') { 
     1369    function sfIsRecord($table, $col, $arrVal, $addwhere = '') 
     1370    { 
    13331371        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    13341372        $arrCol = preg_split('/[, ]/', $col); 
     
    13631401     * @return void 
    13641402     */ 
    1365     function sfCountMaker($objQuery) { 
     1403    function sfCountMaker($objQuery) 
     1404    { 
    13661405        $sql = ''; 
    13671406 
     
    13871426     * 
    13881427     */ 
    1389     function sfGetMakerId($product_id, $maker_id = 0, $closed = false) { 
     1428    function sfGetMakerId($product_id, $maker_id = 0, $closed = false) 
     1429    { 
    13901430        if ($closed) { 
    13911431            $status = ''; 
     
    14211461     * @return array カテゴリツリーの配列 
    14221462     */ 
    1423     function sfGetMakerList($addwhere = '', $products_check = false) { 
     1463    function sfGetMakerList($addwhere = '', $products_check = false) 
     1464    { 
    14241465        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    14251466        $where = 'del_flg = 0'; 
     
    14581499     * @return integer 税金額 
    14591500     */ 
    1460     function sfTax($price) { 
     1501    function sfTax($price) 
     1502    { 
    14611503        // 店舗基本情報を取得 
    14621504        $CONF = SC_Helper_DB_Ex::sfGetBasisData(); 
     
    14721514     * @return integer 税金付与した金額 
    14731515     */ 
    1474     function sfCalcIncTax($price, $tax = null, $tax_rule = null) { 
     1516    function sfCalcIncTax($price, $tax = null, $tax_rule = null) 
     1517    { 
    14751518        // 店舗基本情報を取得 
    14761519        $CONF = SC_Helper_DB_Ex::sfGetBasisData(); 
     
    14881531     * @return integer 加算ポイント 
    14891532     */ 
    1490     function sfGetAddPoint($totalpoint, $use_point) { 
     1533    function sfGetAddPoint($totalpoint, $use_point) 
     1534    { 
    14911535        // 店舗基本情報を取得 
    14921536        $CONF = SC_Helper_DB_Ex::sfGetBasisData(); 
     
    15031547     * @return void 
    15041548     */ 
    1505     function sfExecSqlByFile($sqlFilePath) { 
     1549    function sfExecSqlByFile($sqlFilePath) 
     1550    { 
    15061551        if (file_exists($sqlFilePath)) { 
    15071552            $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     
    15241569     * @return bool 商品規格が存在する場合:true, それ以外:false 
    15251570     */ 
    1526     function sfHasProductClass($product_id) { 
     1571    function sfHasProductClass($product_id) 
     1572    { 
    15271573        if (!SC_Utils_Ex::sfIsInt($product_id)) return false; 
    15281574 
     
    15401586     * @return void 
    15411587     */ 
    1542     static function registerBasisData($arrData) { 
     1588    static function registerBasisData($arrData) 
     1589    { 
    15431590        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    15441591 
Note: See TracChangeset for help on using the changeset viewer.