+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
static $_currencySymbols = NULL;
/**
- * Format a monetary string
+ * Format a monetary string.
*
* Format a monetary string basing on the amount provided,
* ISO currency code provided and a format string consisting of:
* %C - the currency ISO code (e.g., 'USD') if provided
* %c - the currency symbol (e.g., '$') if available
*
- * @param float $amount the monetary amount to display (1234.56)
- * @param string $currency the three-letter ISO currency code ('USD')
- * @param string $format the desired currency format
+ * @param float $amount
+ * The monetary amount to display (1234.56).
+ * @param string $currency
+ * The three-letter ISO currency code ('USD').
+ * @param string $format
+ * The desired currency format.
* @param bool $onlyNumber
- * @param string $valueFormat the desired monetary value display format (e.g. '%!i')
+ * @param string $valueFormat
+ * The desired monetary value display format (e.g. '%!i').
*
- * @return string formatted monetary string
+ * @return string
+ * formatted monetary string
*
- * @static
*/
public static function format($amount, $currency = NULL, $format = NULL, $onlyNumber = FALSE, $valueFormat = NULL) {
}
if (!self::$_currencySymbols) {
- self::$_currencySymbols = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'currency', array('keyColumn' => 'name', 'labelColumn' => 'symbol'));
+ self::$_currencySymbols = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'currency', array(
+ 'keyColumn' => 'name',
+ 'labelColumn' => 'symbol',
+ ));
}
if (!$currency) {
);
return strtr($format, $replacements);
}
-}
+}