4 * Smarty Method AssignByRef
6 * Smarty::assignByRef() method
9 * @subpackage PluginsInternal
12 class Smarty_Internal_Method_AssignByRef
16 * assigns values to template variables by reference
18 * @param \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty $data
19 * @param string $tpl_var the template variable name
21 * @param boolean $nocache if true any output of this variable will be not cached
23 * @return \Smarty_Internal_Data|\Smarty_Internal_Template|\Smarty
25 public function assignByRef(Smarty_Internal_Data $data, $tpl_var, &$value, $nocache)
28 $data->tpl_vars[ $tpl_var ] = new Smarty_Variable(null, $nocache);
29 $data->tpl_vars[ $tpl_var ]->value = &$value;
30 if ($data->_isTplObj() && $data->scope) {
31 $data->ext->_updateScope->_updateScope($data, $tpl_var);