本文整理汇总了PHP中Sentinel::destroy方法的典型用法代码示例。如果您正苦于以下问题:PHP Sentinel::destroy方法的具体用法?PHP Sentinel::destroy怎么用?PHP Sentinel::destroy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sentinel
的用法示例。
在下文中一共展示了Sentinel::destroy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: set_error_handler
*/
set_error_handler(function ($errno, $errstr, $errfile, $errline, array $errcontext) {
throw new ErrorException($errstr, 0, $errno, $errfile, $errline);
});
$a = date('U');
restore_error_handler();
switch ($_POST['s']) {
/*
|--------------------------------------------------------------------------
| Auth 1. Ask for authentication
|--------------------------------------------------------------------------
|
*/
case 'auth':
// Destroy a previous session
Sentinel::destroy();
$return['notice'] = '<h2>' . __('Setup admin account') . '</h2>' . '<br/>' . __('You can use <em>Pimp my Log</em> without authentication. You will be able to add this feature later from the debugger web interface.') . '<br/>' . '<br/>' . __('Setup an admin account will let you create other users later and give them access to certain log files only.') . '<br/>' . '<br/>' . __('Do you want to create an admin account now?') . '<br/>' . '<br/>' . '<br/>' . '<a href="javascript:process_authentication_yes()" class="btn btn-primary">' . __('Create an admin account') . '</a>' . ' ' . '<a href="javascript:process_authentication_no()" class="btn btn-default">' . __('No') . '</a>';
break;
/*
|--------------------------------------------------------------------------
| Auth 2. Touch auth file
|--------------------------------------------------------------------------
|
*/
/*
|--------------------------------------------------------------------------
| Auth 2. Touch auth file
|--------------------------------------------------------------------------
|
*/
case 'authtouch':