Documentation

Thai
in package
uses ArrayEnabled

Table of Contents

Constants

THAI_BAHT  = 'บาท'
THAI_COMPOUND_ONE  = 'เอ็ด'
THAI_COMPOUND_TWO  = 'ยี่'
THAI_DIGITS  = [0 => 'ศูนย์', 1 => 'หนึ่ง', 2 => 'สอง', 3 => 'สาม', 4 => 'สี่', 5 => 'ห้า', 6 => 'หก', 7 => 'เจ็ด', 8 => 'แปด', 9 => 'เก้า']
THAI_INTEGER  = 'ถ้วน'
THAI_MINUS  = 'ลบ'
THAI_SATANG  = 'สตางค์'
THAI_UNITS  = [1 => 'สิบ', 2 => 'ร้อย', 3 => 'พัน', 4 => 'หมื่น', 5 => 'แสน', 6 => 'ล้าน']

Properties

$arrayArgumentHelper  : ArrayArgumentHelper
$initializationNeeded  : bool

Methods

getBahtText()  : array<string|int, mixed>|string
BAHTTEXT.
evaluateArrayArguments()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument.
evaluateArrayArgumentsIgnore()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument except for the one specified by ignore.
evaluateArrayArgumentsSubset()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, but only the first few (up to limit) can be an array arguments.
evaluateArrayArgumentsSubsetFrom()  : array<string|int, mixed>
Handles array argument processing when the function accepts multiple arguments, but only the last few (from start) can be an array arguments.
evaluateSingleArgumentArray()  : array<string|int, mixed>
Handles array argument processing when the function accepts a single argument that can be an array argument.
convertBlock()  : string
convertLarge()  : string
initialiseHelper()  : void
testFalse()  : bool

Constants

THAI_BAHT

private mixed THAI_BAHT = 'บาท'

THAI_COMPOUND_ONE

private mixed THAI_COMPOUND_ONE = 'เอ็ด'

THAI_COMPOUND_TWO

private mixed THAI_COMPOUND_TWO = 'ยี่'

THAI_DIGITS

private mixed THAI_DIGITS = [0 => 'ศูนย์', 1 => 'หนึ่ง', 2 => 'สอง', 3 => 'สาม', 4 => 'สี่', 5 => 'ห้า', 6 => 'หก', 7 => 'เจ็ด', 8 => 'แปด', 9 => 'เก้า']

THAI_INTEGER

private mixed THAI_INTEGER = 'ถ้วน'

THAI_MINUS

private mixed THAI_MINUS = 'ลบ'

THAI_SATANG

private mixed THAI_SATANG = 'สตางค์'

THAI_UNITS

private mixed THAI_UNITS = [1 => 'สิบ', 2 => 'ร้อย', 3 => 'พัน', 4 => 'หมื่น', 5 => 'แสน', 6 => 'ล้าน']

Properties

$initializationNeeded

private static bool $initializationNeeded = true

Methods

getBahtText()

BAHTTEXT.

public static getBahtText(mixed $number) : array<string|int, mixed>|string
Parameters
$number : mixed

The number or array of numbers to convert

Return values
array<string|int, mixed>|string

If an array of values is passed as the argument, then the returned result will also be an array with the same dimensions

evaluateArrayArguments()

Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument.

protected static evaluateArrayArguments(callable $method, mixed ...$arguments) : array<string|int, mixed>

Example use for: ROUND() or DATE().

Parameters
$method : callable
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsIgnore()

Handles array argument processing when the function accepts multiple arguments, and any of them can be an array argument except for the one specified by ignore.

protected static evaluateArrayArgumentsIgnore(callable $method, int $ignore, mixed ...$arguments) : array<string|int, mixed>

Example use for: HLOOKUP() and VLOOKUP(), where argument 1 is a matrix that needs to be treated as a database rather than as an array argument.

Parameters
$method : callable
$ignore : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsSubset()

Handles array argument processing when the function accepts multiple arguments, but only the first few (up to limit) can be an array arguments.

protected static evaluateArrayArgumentsSubset(callable $method, int $limit, mixed ...$arguments) : array<string|int, mixed>

Example use for: NETWORKDAYS() or CONCATENATE(), where the last argument is a matrix (or a series of values) that need to be treated as a such rather than as an array arguments.

Parameters
$method : callable
$limit : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateArrayArgumentsSubsetFrom()

Handles array argument processing when the function accepts multiple arguments, but only the last few (from start) can be an array arguments.

protected static evaluateArrayArgumentsSubsetFrom(callable $method, int $start, mixed ...$arguments) : array<string|int, mixed>

Example use for: Z.TEST() or INDEX(), where the first argument 1 is a matrix that needs to be treated as a dataset rather than as an array argument.

Parameters
$method : callable
$start : int
$arguments : mixed
Return values
array<string|int, mixed>

evaluateSingleArgumentArray()

Handles array argument processing when the function accepts a single argument that can be an array argument.

protected static evaluateSingleArgumentArray(callable $method, array<string|int, mixed> $values) : array<string|int, mixed>

Example use for: DAYOFMONTH() or FACT().

Parameters
$method : callable
$values : array<string|int, mixed>
Return values
array<string|int, mixed>

convertBlock()

private static convertBlock(string $block) : string
Parameters
$block : string
Return values
string

convertLarge()

private static convertLarge(string $digits) : string
Parameters
$digits : string
Return values
string

initialiseHelper()

private static initialiseHelper(array<string|int, mixed> $arguments) : void
Parameters
$arguments : array<string|int, mixed>

testFalse()

private static testFalse(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

        
On this page

Search results