Documentation

Core_Inflection
in package

AbstractYes

Abstract inflection

Tags
subpackage

Core\Inflection

version
7.x
author

Hostmake LLC

copyright

© 2005-2024 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

Table of Contents

Properties

$pluralIrregular  : array<string|int, mixed>
Array of irregular form singular => plural
$singularIrregular  : array<string|int, mixed>
Array of irregular form plural => singular, based on self::$pluralIrregular
$_drivers  : array<string|int, mixed>
List of language drivers
$_maxObjects  : int
Maximum count of objects Максимальное количество объектов
$_pluralCache  : array<string|int, mixed>
Cache
$_singularCache  : array<string|int, mixed>
Cache

Methods

available()  : bool
Check if driver available
currencyInWords()  : mixed
getClassName()  : string
Get class name
getPlural()  : string
Get plural form of word
getSingular()  : string
Get singular form of word
instance()  : mixed
Get driver instance
isPluralIrrigular()  : bool
Chech if $word is PLURAL and IRRIGUAL
isSingularIrrigular()  : bool
Chech if $word is SINGULAR and IRRIGUAL
num2str()  : string
Number to str
plural()  : string
Get plural form by singular
singular()  : string
Get singular form by plural

Properties

$pluralIrregular

Array of irregular form singular => plural

public static array<string|int, mixed> $pluralIrregular = array()

$singularIrregular

Array of irregular form plural => singular, based on self::$pluralIrregular

public static array<string|int, mixed> $singularIrregular = array()

$_drivers

List of language drivers

protected static array<string|int, mixed> $_drivers = array()

$_maxObjects

Maximum count of objects Максимальное количество объектов

protected static int $_maxObjects = 512

$_pluralCache

Cache

protected array<string|int, mixed> $_pluralCache = array()

$_singularCache

Cache

protected array<string|int, mixed> $_singularCache = array()

Methods

available()

Check if driver available

public static available([string $lng = 'en' ]) : bool
Parameters
$lng : string = 'en'

language

Return values
bool

currencyInWords()

public abstract currencyInWords(mixed $float, mixed $currencyCode) : mixed
Parameters
$float : mixed
$currencyCode : mixed

getClassName()

Get class name

public static getClassName(string $lng) : string
Parameters
$lng : string

language

Return values
string

e.g. Core_Inflection_En

getPlural()

Get plural form of word

public static getPlural(string $word[, int $count = NULL ][, string $lng = 'en' ]) : string
Parameters
$word : string

word

$count : int = NULL
$lng : string = 'en'

driver

Return values
string

getSingular()

Get singular form of word

public static getSingular(string $word[, int $count = NULL ][, string $lng = 'en' ]) : string
Parameters
$word : string

word

$count : int = NULL
$lng : string = 'en'

driver

Return values
string

instance()

Get driver instance

public static instance([string $lng = 'en' ]) : mixed
Parameters
$lng : string = 'en'

language

isPluralIrrigular()

Chech if $word is PLURAL and IRRIGUAL

public isPluralIrrigular(mixed $word) : bool
Parameters
$word : mixed
Return values
bool

isSingularIrrigular()

Chech if $word is SINGULAR and IRRIGUAL

public isSingularIrrigular(mixed $word) : bool
Parameters
$word : mixed
Return values
bool

num2str()

Number to str

public static num2str(float $float[, string $lng = 'en' ]) : string
Parameters
$float : float
$lng : string = 'en'
Return values
string

plural()

Get plural form by singular

public plural(mixed $singularWord[, int $count = NULL ]) : string
Parameters
$singularWord : mixed
$count : int = NULL
Return values
string

singular()

Get singular form by plural

public singular(string $pluralWord[, mixed $count = NULL ]) : string
Parameters
$pluralWord : string

word

$count : mixed = NULL
Return values
string

        
On this page

Search results