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
ファイルを表示 Open project: horde/horde

Protected Properties

Property Type Description
$_db Horde_Db_Adapter Handle for the database connection.

Public Methods

Method 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 method

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 method

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

exists() public method

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

purge() public method

Delete all expired connection IDs.
public purge ( )

Property Details

$_db protected_oe property

Handle for the database connection.
protected Horde_Db_Adapter $_db
return Horde_Db_Adapter