$db = eZDB::instance( $dbImpl, $params, true ); eZDB::setInstance( $db ); } $db->setIsSQLOutputEnabled( $showSQL ); if ( $clean['session'] ) { if ( !eZSession::getHandlerInstance()->hasBackendAccess() ) { $cli->output( "Could not remove sessions, current session handler does not support session cleanup (not backend based)." ); } else { $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" );