Exemple #1
0
 /**
  * verifikasi token
  * @param string $token
  */
 public static function verify($token)
 {
     if (!is_null(Session::get(self::$variableName)) && Session::get(self::$variableName) == $token) {
         return true;
     }
     return false;
 }
Exemple #2
0
 public static function old($key, $value = null)
 {
     $input = Session::get("Input");
     if (!is_null(self::request($key))) {
         if (isset($_SESSION['Flash']['Input']['Value'][$key])) {
             unset($_SESSION['Flash']['Input']['Value'][$key]);
         }
         return self::request($key);
     }
     return isset($input[$key]) ? $input[$key] : $value;
 }
Exemple #3
0
 /**
  * fungsi yang akan dijalankan setelah controller dijalankan.
  */
 private static function after()
 {
     if (!Request::isAjax()) {
         Session::clearFlash();
     }
 }