PHP Class Horde_Token_Sql, horde

The table structure for the tokens is as follows:
CREATE TABLE horde_tokens (
    token_address    VARCHAR(100) NOT NULL,
    token_id         VARCHAR(32) NOT NULL,
    token_timestamp  BIGINT NOT NULL,

    PRIMARY KEY (token_address, token_id)
);
Copyright 1999-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
Author: Max Kalika ([email protected])
Inheritance: extends Horde_Token_Base
Afficher le fichier Open project: horde/horde

Protected Properties

Свойство Type Description
$_db Horde_Db_Adapter Handle for the database connection.

Méthodes publiques

Méthode Description
__construct ( array $params = [] ) Constructor.
add ( string $tokenID ) Add a token ID.
exists ( string $tokenID ) : boolean Does the token exist?
purge ( ) Delete all expired connection IDs.

Method Details

__construct() public méthode

Constructor.
See also: Horde_Token_Base::__construct() for more parameters.
public __construct ( array $params = [] )
$params array Required parameters: - db (Horde_Db_Adapter): The DB instance. Optional parameters: - table (string): The name of the tokens table. DEFAULT: 'horde_tokens'

add() public méthode

Add a token ID.
public add ( string $tokenID )
$tokenID string Token ID to add.

exists() public méthode

Does the token exist?
public exists ( string $tokenID ) : boolean
$tokenID string Token ID.
Résultat boolean True if the token exists.

purge() public méthode

Delete all expired connection IDs.
public purge ( )

Property Details

$_db protected_oe property

Handle for the database connection.
protected Horde_Db_Adapter $_db
Résultat Horde_Db_Adapter