/** * Play back the full stack of template variables to assign them into the template */ protected function play_var_stack() { if (!$this->added_template_vars) { $this->add_template_vars(); } $this->template_engine->clear(); $stack = call_user_func_array('array_merge', $this->var_stack); foreach ($stack as $key => $value) { $this->template_engine->assign($key, $value); } }