本文整理匯總了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':