class I18nTokenHelper implements SerializableInterface

Traits

Methods

static I18nTokenHelper
_(string $formatString, string|array ...$formatValues)

No description

string
__toString()

No description

string
getTranslatedString()

Return the translation of this token

array
jsonSerialize()

No description

static I18nTokenHelper
ngettext(string $singularToken, string $pluralToken, int $count, array $placeholder = [])

No description

void
onSerialize()

Optional: Called before serialization (e.g. to remember/convert an unserializable prop)

void
onUnserialize()

Optional: Called after unserialize (e.g. load from db / recover or connect resource)

array|null
serializePropertiesInclude()

Optional: Override this method and specify the properties to include during serialize null = All Properties will be serialized (default) [] = No Properties will be serialized ['id'] = $this->id will be serialized

setExplicitTranslations(array $explicitTranslations = [])

Set explicit translation strings to use when evaluating token

setTokenDomain(string $tokenDomain = 'default')

Set explicit domain for this translation token

static object
unserializeObject(SerializedObjectHelper $SerializedObjectHelper)

No description

static object
unserializeObjectFromJSON(string $json)

No description

Details

at line 33
static I18nTokenHelper _(string $formatString, string|array ...$formatValues)

No description

Parameters

string $formatString

"Max likes %s and has %d items of it"

string|array ...$formatValues

" bananas , 5 "

Return Value

I18nTokenHelper

at line 105
string __toString()

No description

Return Value

string

at line 79
string getTranslatedString()

Return the translation of this token

Return Value

string

array jsonSerialize()

No description

Return Value

array

Exceptions

ReflectionException

at line 45
static I18nTokenHelper ngettext(string $singularToken, string $pluralToken, int $count, array $placeholder = [])

No description

Parameters

string $singularToken
string $pluralToken
int $count
array $placeholder

Return Value

I18nTokenHelper

void onSerialize()

Optional: Called before serialization (e.g. to remember/convert an unserializable prop)

Return Value

void

void onUnserialize()

Optional: Called after unserialize (e.g. load from db / recover or connect resource)

Return Value

void

SerializedObjectHelper serializeObject()

No description

protected array|null serializePropertiesInclude()

Optional: Override this method and specify the properties to include during serialize null = All Properties will be serialized (default) [] = No Properties will be serialized ['id'] = $this->id will be serialized

Return Value

array|null

at line 56
I18nTokenHelper setExplicitTranslations(array $explicitTranslations = [])

Set explicit translation strings to use when evaluating token

Parameters

array $explicitTranslations

['en' => "english text', 'de' => "deutscher Text"]

Return Value

I18nTokenHelper

at line 69
I18nTokenHelper setTokenDomain(string $tokenDomain = 'default')

Set explicit domain for this translation token

Parameters

string $tokenDomain

Return Value

I18nTokenHelper

static object unserializeObject(SerializedObjectHelper $SerializedObjectHelper)

No description

Parameters

SerializedObjectHelper $SerializedObjectHelper

Return Value

object

Exceptions

ReflectionException

static object unserializeObjectFromJSON(string $json)

No description

Parameters

string $json

Return Value

object

Exceptions

JsonException
ReflectionException