本文整理汇总了PHP中eZSession::garbageCollector方法的典型用法代码示例。如果您正苦于以下问题:PHP eZSession::garbageCollector方法的具体用法?PHP eZSession::garbageCollector怎么用?PHP eZSession::garbageCollector使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZSession
的用法示例。
在下文中一共展示了eZSession::garbageCollector方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: collection
{
$cli->output( "Removing all sessions" );
eZSession::cleanup();
}
}
if ( $clean['expired_session'] )
{
if ( !eZSession::getHandlerInstance()->hasBackendAccess() )
{
$cli->output( "Could not remove expired sessions, current session handler does not support session garbage collection (not backend based)." );
}
else
{
$cli->output( "Removing expired sessions,", false );
eZSession::garbageCollector();
$activeCount = eZSession::countActive();
$cli->output( " " . $cli->stylize( 'emphasize', $activeCount ) . " left" );
}
}
if ( $clean['preferences'] )
{
$cli->output( "Removing all preferences" );
eZPreferences::cleanup();
}
if ( $clean['browse'] )
{
$cli->output( "Removing all recent items and bookmarks for browse page" );
eZContentBrowseRecent::cleanup();
示例2: foreach
}
if ($module->hasActionParameter('ExpirationFilterType')) {
$expirationFilterType = $module->actionParameter('ExpirationFilterType');
}
if (!in_array($expirationFilterType, array('all', 'active'))) {
$expirationFilterType = 'active';
}
$http->setSessionVariable('eZSessionFilterType', $filterType);
$http->setSessionVariable('eZSessionExpirationFilterType', $expirationFilterType);
} else {
if ($module->isCurrentAction('RemoveAllSessions')) {
eZSession::cleanup();
$sessionsRemoved = true;
} else {
if ($module->isCurrentAction('RemoveTimedOutSessions')) {
$gcSessionsCompleted = eZSession::garbageCollector();
$sessionsRemoved = true;
} else {
if ($module->isCurrentAction('RemoveSelectedSessions')) {
if ($userID) {
if ($http->hasPostVariable('SessionKeyArray')) {
$sessionKeyArray = $http->postVariable('SessionKeyArray');
foreach ($sessionKeyArray as $sessionKeyItem) {
eZSession::getHandlerInstance()->destroy($sessionKeyItem);
}
}
} else {
if ($http->hasPostVariable('UserIDArray')) {
$userIDArray = $http->postVariable('UserIDArray');
if (count($userIDArray) > 0) {
eZSession::getHandlerInstance()->deleteByUserIDs($userIDArray);