Horde_Support_Numerizer_Locale_Base
in package
Tags
Table of Contents
- $BIG_PREFIXES : mixed
- $DIRECT_NUMS : mixed
- $TEN_PREFIXES : mixed
- numerize() : mixed
- _andition() : mixed
- _directReplacements() : mixed
- easy/direct replacements
- _fractionalAddition() : mixed
- _hideAHalf() : mixed
- take the 'a' out so it doesn't turn into a 1, save the half for the end
- _replaceBigPrefixes() : mixed
- hundreds, thousands, millions, etc.
- _replaceTenPrefixes() : mixed
- ten, twenty, etc.
- _splitHyphenatedWords() : mixed
- will mutilate hyphenated-words but shouldn't matter for date extraction
Properties
$BIG_PREFIXES
public
mixed
$BIG_PREFIXES
= array('hundred' => 100, 'thousand' => 1000, 'million' => 1000000, 'billion' => 1000000000, 'trillion' => 1000000000000)
$DIRECT_NUMS
public
mixed
$DIRECT_NUMS
= array(
'eleven' => '11',
'twelve' => '12',
'thirteen' => '13',
'fourteen' => '14',
'fifteen' => '15',
'sixteen' => '16',
'seventeen' => '17',
'eighteen' => '18',
'nineteen' => '19',
'ninteen' => '19',
// Common mis-spelling
'zero' => '0',
'one' => '1',
'two' => '2',
'three' => '3',
'four(\W|$)' => '4$1',
// The weird regex is so that it matches four but not fourty
'five' => '5',
'six(\W|$)' => '6$1',
'seven(\W|$)' => '7$1',
'eight(\W|$)' => '8$1',
'nine(\W|$)' => '9$1',
'ten' => '10',
'\ba[\b^$]' => '1',
)
$TEN_PREFIXES
public
mixed
$TEN_PREFIXES
= array(
'twenty' => 20,
'thirty' => 30,
'forty' => 40,
'fourty' => 40,
// Common mis-spelling
'fifty' => 50,
'sixty' => 60,
'seventy' => 70,
'eighty' => 80,
'ninety' => 90,
'ninty' => 90,
)
Methods
numerize()
public
numerize(mixed $string) : mixed
Parameters
- $string : mixed
Return values
mixed —_andition()
protected
_andition(mixed $string) : mixed
Parameters
- $string : mixed
Return values
mixed —_directReplacements()
easy/direct replacements
protected
_directReplacements(mixed $string) : mixed
Parameters
- $string : mixed
Return values
mixed —_fractionalAddition()
protected
_fractionalAddition(mixed $string) : mixed
Parameters
- $string : mixed
Return values
mixed —_hideAHalf()
take the 'a' out so it doesn't turn into a 1, save the half for the end
protected
_hideAHalf(mixed $string) : mixed
Parameters
- $string : mixed
Return values
mixed —_replaceBigPrefixes()
hundreds, thousands, millions, etc.
protected
_replaceBigPrefixes(mixed $string) : mixed
Parameters
- $string : mixed
Return values
mixed —_replaceTenPrefixes()
ten, twenty, etc.
protected
_replaceTenPrefixes(mixed $string) : mixed
Parameters
- $string : mixed
Return values
mixed —_splitHyphenatedWords()
will mutilate hyphenated-words but shouldn't matter for date extraction
protected
_splitHyphenatedWords(mixed $string) : mixed
Parameters
- $string : mixed