<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
* %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
*/
- static function format($amount, $currency = NULL, $format = NULL, $onlyNumber = FALSE, $valueFormat = NULL) {
+ public static function format($amount, $currency = NULL, $format = NULL, $onlyNumber = FALSE, $valueFormat = NULL) {
if (CRM_Utils_System::isNull($amount)) {
return '';
}
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);
}
}
-