\Charcoal\View\MustacheTranslatorHelpers

Translating Mustache Templates

Summary

Methods
Properties
Constants
__construct()
toArray()
__invoke()
__isset()
__get()
No public properties found
No constants found
reset()
No protected properties found
N/A
No private methods found
$translator
$number
$locale
$domain
N/A

Properties

$translator

$translator : \Charcoal\Translator\Translator|null

Store the translator service.

Type

\Charcoal\Translator\Translator|null

$number

$number : integer|null

Store the given number to use to find the indice of the message.

Requires FILTERS pragma.

Type

integer|null

$locale

$locale : string|null

Store the given locale (Mustache tag node).

Type

string|null

$domain

$domain : string|null

Store the given domain for the message (Mustache tag node).

Type

string|null

Methods

__construct()

__construct(array  $data = null) 

Parameters

array $data

Class Dependencies.

toArray()

toArray() : array

Retrieve the helpers.

Returns

array

__invoke()

__invoke(string  $text, \Mustache_LambdaHelper|null  $helper = null) : boolean

Magic: Render the Mustache section.

Parameters

string $text

The translation key.

\Mustache_LambdaHelper|null $helper

For rendering strings in the current context.

Returns

boolean

__isset()

__isset(string  $macro) : boolean

Magic: Determine if a property is set and is not NULL.

Required by Mustache.

Parameters

string $macro

A domain, locale, or number.

Returns

boolean

__get()

__get(string  $macro) : mixed

Magic: Process domain, locale, and number.

Required by Mustache.

Parameters

string $macro

A domain, locale, or number.

Returns

mixed

reset()

reset() : void

Clear macros.