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

    r22267 r22567  
    1313   * @version $Id$ 
    1414   */ 
    15 class SC_Helper_CSV { 
     15class SC_Helper_CSV  
     16{ 
    1617 
    1718    // {{{ properties 
     
    2930     * デフォルトコンストラクタ. 
    3031     */ 
    31     function __construct() { 
     32    function __construct() 
     33    { 
    3234        $this->init(); 
    3335    } 
     
    4244     * @return void 
    4345     */ 
    44     function init() { 
     46    function init() 
     47    { 
    4548        $this->arrSubnavi = array( 
    4649            1 => 'product', 
     
    7073     * @return mixed $is_download = true時 成功失敗フラグ(boolean) 、$is_downalod = false時 string 
    7174     */ 
    72     function sfDownloadCsv($csv_id, $where = '', $arrVal = array(), $order = '', $is_download = false) { 
     75    function sfDownloadCsv($csv_id, $where = '', $arrVal = array(), $order = '', $is_download = false) 
     76    { 
    7377        // CSV出力タイトル行の作成 
    7478        $arrOutput = SC_Utils_Ex::sfSwapArray($this->sfGetCsvOutput($csv_id, 'status = ' . CSV_COLUMN_STATUS_FLG_ENABLE)); 
     
    116120     * @return array CSV 項目の配列 
    117121     */ 
    118     function sfGetCsvOutput($csv_id = '', $where = '', $arrVal = array(), $order = 'rank, no') { 
     122    function sfGetCsvOutput($csv_id = '', $where = '', $arrVal = array(), $order = 'rank, no') 
     123    { 
    119124        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    120125 
     
    142147     * @return boolean true:インポート可能、false:インポート不可 
    143148     */ 
    144     function sfIsImportCSVFrame(&$arrCSVFrame) { 
     149    function sfIsImportCSVFrame(&$arrCSVFrame) 
     150    { 
    145151        $result = true; 
    146152        foreach ($arrCSVFrame as $val) { 
     
    163169     * @return boolean true:更新可能、false:新規追加のみ不可 
    164170     */ 
    165     function sfIsUpdateCSVFrame(&$arrCSVFrame) { 
     171    function sfIsUpdateCSVFrame(&$arrCSVFrame) 
     172    { 
    166173        $result = true; 
    167174        foreach ($arrCSVFrame as $val) { 
     
    182189     * @return integer CSV のカウント数 
    183190     */ 
    184     function sfGetCSVRecordCount($fp) { 
     191    function sfGetCSVRecordCount($fp) 
     192    { 
    185193        $count = 0; 
    186194        while (!feof($fp)) { 
     
    202210     * @return boolean true (true:固定 false:中断) 
    203211     */ 
    204     function cbOutputCSV($data) { 
     212    function cbOutputCSV($data) 
     213    { 
    205214        $line = $this->sfArrayToCSV($data); 
    206215        $line = mb_convert_encoding($line, 'SJIS-Win'); 
     
    221230     * @return mixed $is_download = true時 成功失敗フラグ(boolean) 、$is_downalod = false時 string 
    222231     */ 
    223     function sfDownloadCsvFromSql($sql, $arrVal = array(), $file_head = 'csv', $arrHeader = array(), $is_download = false) { 
     232    function sfDownloadCsvFromSql($sql, $arrVal = array(), $file_head = 'csv', $arrHeader = array(), $is_download = false) 
     233    { 
    224234        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    225235 
     
    265275     * @return string 結果行 
    266276     */ 
    267     function sfArrayToCsv($fields, $delimiter = ',', $enclosure = '"', $arrayDelimiter = '|') { 
     277    function sfArrayToCsv($fields, $delimiter = ',', $enclosure = '"', $arrayDelimiter = '|') 
     278    { 
    268279        if (strlen($delimiter) != 1) { 
    269280            trigger_error('delimiter must be a single character', E_USER_WARNING); 
     
    302313     * @return void 
    303314     */ 
    304     function lfDownloadCsv($arrData, $prefix = '') { 
     315    function lfDownloadCsv($arrData, $prefix = '') 
     316    { 
    305317 
    306318        if ($prefix == '') { 
     
    332344     * @return void 
    333345     */ 
    334     function lfDownloadCSVFile($filepath, $prefix = '') { 
     346    function lfDownloadCSVFile($filepath, $prefix = '') 
     347    { 
    335348        $file_name = $prefix . date('YmdHis') . '.csv'; 
    336349 
Note: See TracChangeset for help on using the changeset viewer.