예제 #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
 /**
  * Loads errors into the session for the redirect
  *
  * @return void
  * @author Dan Cox
  */
 public function withErrors($errors)
 {
     Session::set('errors', $errors);
     return $this;
 }
예제 #3
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');
     }
 }