/** * Render, renders the template through the delegating engine. * * @param {string} $template the template name * @param {array} $assocArr an associative array of variables * * @return string * @author Dan Cox */ public function render($template, $assocArr = []) { // If the session has errors, load these as variables if (Session::has('errors')) { $assocArr = array_merge($assocArr, array('errors' => Session::get('errors'))); Session::remove('errors'); } return $this->template->render($template, $assocArr); }