PHP Class Horde_Token_File, horde

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
Datei anzeigen Open project: horde/horde

Protected Properties

Property Type Description
$_connected boolean Boolean indicating whether or not we have an open file descriptor.
$_fd resource Handle for the open file descriptor.

Public Methods

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

Protected Methods

Method Description
_connect ( ) Opens a file descriptor to a new or existing file.
_disconnect ( boolean $error = true ) Closes the file descriptor.

Method Details

__construct() public method

Constructor.
See also: Horde_Token_Base::__construct() for more parameters.
public __construct ( array $params = [] )
$params array Optional parameters: - token_dir (string): The directory where to keep token files. DEFAULT: System temporary directory

__destruct() public method

Destructor.
public __destruct ( )

_connect() protected method

Opens a file descriptor to a new or existing file.
protected _connect ( )

_disconnect() protected method

Closes the file descriptor.
protected _disconnect ( boolean $error = true )
$error boolean Throw exception on error?

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

$_connected protected_oe property

Boolean indicating whether or not we have an open file descriptor.
protected bool $_connected
return boolean

$_fd protected_oe property

Handle for the open file descriptor.
protected resource $_fd
return resource