Documentation

Base
in package

Tags
author

Chuck Hagenbuch chuck@horde.org

license

http://www.horde.org/licenses/bsd BSD

category

Horde

Table of Contents

$BIG_PREFIXES  : mixed
$DIRECT_NUMS  : mixed
$TEN_PREFIXES  : mixed
$args  : mixed
Arguments from the constructor
__construct()  : mixed
Constructor
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 = ['hundred' => 100, 'thousand' => 1000, 'million' => 1000000, 'billion' => 1000000000, 'trillion' => 1000000000000]

$DIRECT_NUMS

public mixed $DIRECT_NUMS = [ '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 = [ 'twenty' => 20, 'thirty' => 30, 'forty' => 40, 'fourty' => 40, // Common mis-spelling 'fifty' => 50, 'sixty' => 60, 'seventy' => 70, 'eighty' => 80, 'ninety' => 90, 'ninty' => 90, ]

$args

Arguments from the constructor

protected mixed $args

Methods

__construct()

Constructor

public __construct(mixed $args) : mixed

These args are provided by existing code but went nowhere Assuming there was some intention, let's store the args

Parameters
$args : mixed
Return values
mixed

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
Return values
mixed

Search results