Пример #1
0
 /**
  * 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);
 }
Пример #2
0
 /**
  * Load Old - loads the old input values through the session
  *
  * @return void
  * @author Dan Cox
  */
 public static function loadOld()
 {
     if (Session::has('Input')) {
         static::$old = Session::decryptSession('Input');
     }
 }