mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Merge pull request #474 from shama/patch-numberhelper
Add missing options to NumberHelper docblocks
This commit is contained in:
commit
d959b0332e
1 changed files with 10 additions and 4 deletions
|
@ -59,7 +59,7 @@ class NumberHelper extends AppHelper {
|
||||||
*/
|
*/
|
||||||
protected $_currencyDefaults = array(
|
protected $_currencyDefaults = array(
|
||||||
'wholeSymbol' => '', 'wholePosition' => 'before', 'fractionSymbol' => '', 'fractionPosition' => 'after',
|
'wholeSymbol' => '', 'wholePosition' => 'before', 'fractionSymbol' => '', 'fractionPosition' => 'after',
|
||||||
'zero' => '0', 'places' => 2, 'thousands' => ',', 'decimals' => '.','negative' => '()', 'escape' => true,
|
'zero' => '0', 'places' => 2, 'thousands' => ',', 'decimals' => '.', 'negative' => '()', 'escape' => true,
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -165,7 +165,11 @@ class NumberHelper extends AppHelper {
|
||||||
* - `thousands` - Thousands separator ie. ','
|
* - `thousands` - Thousands separator ie. ','
|
||||||
* - `decimals` - Decimal separator symbol ie. '.'
|
* - `decimals` - Decimal separator symbol ie. '.'
|
||||||
* - `negative` - Symbol for negative numbers. If equal to '()', the number will be wrapped with ( and )
|
* - `negative` - Symbol for negative numbers. If equal to '()', the number will be wrapped with ( and )
|
||||||
* - `escape` - Should the output be htmlentity escaped? Defaults to true
|
* - `escape` - Should the output be htmlentity escaped? Defaults to true.
|
||||||
|
* - `wholeSymbol` String to use for whole numbers ie. ' dollars'.
|
||||||
|
* - `wholePosition` Either 'before' or 'after' to place the whole symbol.
|
||||||
|
* - `fractionSymbol` String to use for fraction numbers ie. ' cents'.
|
||||||
|
* - `fractionPosition` Either 'before' or 'after' to place the fraction symbol.
|
||||||
*
|
*
|
||||||
* @param float $number
|
* @param float $number
|
||||||
* @param string $currency Shortcut to default options. Valid values are 'USD', 'EUR', 'GBP', otherwise
|
* @param string $currency Shortcut to default options. Valid values are 'USD', 'EUR', 'GBP', otherwise
|
||||||
|
@ -238,8 +242,10 @@ class NumberHelper extends AppHelper {
|
||||||
*
|
*
|
||||||
* {{{
|
* {{{
|
||||||
* array(
|
* array(
|
||||||
* 'before' => '$', 'after' => 'c', 'zero' => 0, 'places' => 2, 'thousands' => ',',
|
* 'wholeSymbol' => '', 'wholePosition' => 'before',
|
||||||
* 'decimals' => '.', 'negative' => '()', 'escape' => true
|
* 'fractionSymbol' => '', 'fractionPosition' => 'after',
|
||||||
|
* 'zero' => '0', 'places' => 2, 'thousands' => ',',
|
||||||
|
* 'decimals' => '.', 'negative' => '()', 'escape' => true,
|
||||||
* )
|
* )
|
||||||
* }}}
|
* }}}
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue