Changeset 23477 for branches/version-2_13-dev/data/class/util/SC_Utils.php
- Timestamp:
- 2014/05/30 18:14:20 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/class/util/SC_Utils.php
r23463 r23477 693 693 * @return integer 税金額 694 694 */ 695 public function sfTax($price, $tax, $tax_rule)695 public static function sfTax($price, $tax, $tax_rule) 696 696 { 697 697 $real_tax = $tax / 100; … … 713 713 * @return integer 税金付与した金額 714 714 */ 715 public function sfCalcIncTax($price, $tax, $tax_rule)715 public static function sfCalcIncTax($price, $tax, $tax_rule) 716 716 { 717 717 return $price + SC_Utils_Ex::sfTax($price, $tax, $tax_rule); … … 723 723 $adjust = pow(10 ,$pow-1); 724 724 725 // 整数且つ0 出なければ桁数指定を行う725 // 整数且つ0でなければ桁数指定を行う 726 726 if (SC_Utils_Ex::sfIsInt($adjust) and $pow > 1) { 727 727 $ret = (round($value * $adjust)/$adjust); … … 741 741 * @return int 742 742 */ 743 public function sfPrePoint($price, $point_rate, $rule = POINT_RULE)743 public static function sfPrePoint($price, $point_rate, $rule = POINT_RULE) 744 744 { 745 745 $real_point = $point_rate / 100; … … 813 813 } 814 814 815 /* 配列をキー名ごとの配列に変更する */ 816 public function sfSwapArray($array, $isColumnName = true) 815 /** 816 * 配列をキー名ごとの配列に変更する 817 * 818 * @param array $array 819 * @param bool $isColumnName 820 * @return array 821 */ 822 public static function sfSwapArray($array, $isColumnName = true) 817 823 { 818 824 $arrRet = array(); … … 837 843 * $requires が指定された場合, $requires に含まれるキーの値のみを返す. 838 844 * 839 * @param array 連想配列840 * @param array 必須キーの配列845 * @param array $hash 連想配列 846 * @param array $requires 必須キーの配列 841 847 * @return array 連想配列の値のみの配列 842 848 */ … … 899 905 } 900 906 901 // 二回以上繰り返されているスラッシュ[/]を一つに変換する。 907 /** 908 * 二回以上繰り返されているスラッシュ[/]を一つに変換する。 909 * 910 * @param string $istr 911 * @return string 912 */ 902 913 public function sfRmDupSlash($istr) 903 914 { … … 910 921 } else { 911 922 $str = $istr; 923 $head = ''; 912 924 } 913 925 $str = preg_replace('|[/]+|', '/', $str);
Note: See TracChangeset
for help on using the changeset viewer.