\GB_User_Meta_Session_Tokens
Meta-based user sessions token manager.
Synopsis
class GB_User_Meta_Session_Tokens
extends GB_Session_Tokens
{
- // Inherited members from GB_Session_Tokens
- protected $user_id;
- // methods
- protected array get_sessions()
- protected array prepare_session()
- protected array|null get_session()
- protected void update_session()
- protected void update_sessions()
- protected void destroy_other_sessions()
- protected void destroy_all_sessions()
- public static void drop_sessions()
- // Inherited methods from GB_Session_Tokens
- protected void __construct()
- public final static GB_Session_Tokens get_instance()
- public final array get()
- public final bool verify()
- public final string create()
- public final void update()
- public final void destroy()
- public final void destroy_others()
- protected final bool is_still_valid()
- public final void destroy_all()
- public final static void destroy_all_for_all_users()
- public final array get_all()
- protected abstract array get_sessions()
- protected abstract array|null get_session()
- protected abstract void update_session()
- protected abstract void destroy_other_sessions()
- protected abstract void destroy_all_sessions()
- public static void drop_sessions()
Hierarchy
Extends
Violations
Checkstyle
Line | Column | Severity | Message |
---|---|---|---|
47 | 25 | error | Method name "GB_Session_Tokens::get_instance" is not in camel caps format |
53 | 11 | error | Whitespace found at end of line |
143 | 11 | error | Whitespace found at end of line |
214 | 18 | error | Method name "GB_Session_Tokens::destroy_others" is not in camel caps format |
236 | 21 | error | Method name "GB_Session_Tokens::is_still_valid" is not in camel caps format |
247 | 18 | error | Method name "GB_Session_Tokens::destroy_all" is not in camel caps format |
260 | 25 | error | Method name "GB_Session_Tokens::destroy_all_for_all_users" is not in camel caps format |
280 | 18 | error | Method name "GB_Session_Tokens::get_all" is not in camel caps format |
293 | 24 | error | Method name "GB_Session_Tokens::get_sessions" is not in camel caps format |
305 | 24 | error | Method name "GB_Session_Tokens::get_session" is not in camel caps format |
318 | 24 | error | Method name "GB_Session_Tokens::update_session" is not in camel caps format |
330 | 24 | error | Method name "GB_Session_Tokens::destroy_other_sessions" is not in camel caps format |
338 | 24 | error | Method name "GB_Session_Tokens::destroy_all_sessions" is not in camel caps format |
348 | 19 | error | Method name "GB_Session_Tokens::drop_sessions" is not in camel caps format |
349 | 6 | error | Closing brace must be on a line by itself |
368 | 15 | error | Method name "GB_User_Meta_Session_Tokens::get_sessions" is not in camel caps format |
393 | 15 | error | Method name "GB_User_Meta_Session_Tokens::prepare_session" is not in camel caps format |
414 | 15 | error | Method name "GB_User_Meta_Session_Tokens::get_session" is not in camel caps format |
436 | 15 | error | Method name "GB_User_Meta_Session_Tokens::update_session" is not in camel caps format |
458 | 15 | error | Method name "GB_User_Meta_Session_Tokens::update_sessions" is not in camel caps format |
476 | 15 | error | Method name "GB_User_Meta_Session_Tokens::destroy_other_sessions" is not in camel caps format |
490 | 15 | error | Method name "GB_User_Meta_Session_Tokens::destroy_all_sessions" is not in camel caps format |
503 | 19 | error | Method name "GB_User_Meta_Session_Tokens::drop_sessions" is not in camel caps format |
Members
protected
- $user_id
—
int
User ID.
Methods
protected
- destroy_all_sessions() — Destroy all session tokens for a user.
- destroy_other_sessions() — Destroy all session tokens for a user, except a single session passed.
- get_session() — Retrieve a session by its verifier (token hash).
- get_sessions() — Get all sessions of a user.
- prepare_session() — Converts an expiration to an array of session information.
- update_session() — Update a session by its verifier.
- update_sessions() — Update a user's sessions in the usermeta table.
public
- drop_sessions() — Destroy all session tokens for all users.
Inherited from GB_Session_Tokens
protected
- destroy_all_sessions() — This method should destroy all sessions for a user.
- destroy_other_sessions() — This method should destroy all session tokens for this user, except a single session passed.
- get_session() — This method should look up a session by its verifier (token hash).
- get_sessions() — This method should retrieve all sessions of a user, keyed by verifier.
- is_still_valid() — Determine whether a session token is still valid, based on expiration.
- update_session() — This method should update a session by its verifier.
public
- create() — Generate a session token and attach session information to it.
- destroy() — Destroy a session token.
- destroy_all() — Destroy all session tokens for a user.
- destroy_all_for_all_users() — Destroy all session tokens for all users.
- destroy_others() — Destroy all session tokens for this user, except a single token, presumably the one in use.
- drop_sessions() — This static method should destroy all session tokens for all users.
- get() — Get a user's session.
- get_all() — Retrieve all sessions of a user.
- get_instance() — Get a session token manager instance for a user.
- update() — Update a session token.
- verify() — Validate a user's session token as authentic.
History
-
2017-05-29T22:42:45+00:00 (commit #ba5872a)
Author: Limych (andrey@khrolenok.ru) / Commiter: Limych (andrey@khrolenok.ru)
Core remastered to Bootstrap CSS framework.