/** * 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; }
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; }
/** * fungsi yang akan dijalankan setelah controller dijalankan. */ private static function after() { if (!Request::isAjax()) { Session::clearFlash(); } }