\WebinoDraw\VarTranslatorVarTranslator

Replace variables in array with values in the other array.

The first array is a specification with custom options with {$variable} in values.

The second array contains data by variable names like keys. Those {$variable} will be substituted with data.

Summary

Methods
Properties
Constants
__construct()
getTranslation()
setTranslation()
apply()
applyOnVar()
createTranslation()
No public properties found
No constants found
No protected methods found
$filter
$helper
$onVar
$translation
N/A
No private methods found
No private properties found
N/A

Properties

Methods

setTranslation()

setTranslation(\WebinoDraw\VarTranslator\Translation  $translation) : $this

Set global translation

Parameters

\WebinoDraw\VarTranslator\Translation $translation

Returns

$this

applyOnVar()

applyOnVar(\WebinoDraw\VarTranslator\Translation  $varTranslation, array  $spec, callable  $callback) : $this

Apply variable logic

Parameters

\WebinoDraw\VarTranslator\Translation $varTranslation
array $spec
callable $callback

Returns

$this