assign()
assign(array|string $var, mixed|null|void $value = null, integer|void $scope = -1) : \Box\Brainy\Templates\TemplateData
Assigns $value to the variable in $var. If an associative array is passed as the only parameter, it is a mapping of variables to assign to the values to assign to them.
Parameters
array|string | $var | the template variable name(s) |
mixed|null|void | $value | the value to assign |
integer|void | $scope | the scope to associate with the Smarty_Variable instance |
Returns
\Box\Brainy\Templates\TemplateData —current TemplateData (or Smarty or Template) instance for chaining