PHP Класс Auth_OpenID_FileStore

Most of the methods of this class are implementation details. People wishing to just use this store need only pay attention to the constructor.
Наследование: extends Auth_OpenID_OpenIDStore
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( string $directory ) Initializes a new {@link Auth_OpenID_FileStore}. This initializes the nonce and association directories, which are subdirectories of the directory passed in.
_allAssocs ( ) Remove expired entries from the database. This is potentially expensive, so only run when it is acceptable to take time.
_filenameEscape ( $str )
_getAssociation ( $filename )
_isFilenameSafe ( $char )
_listdir ( $dir )
_mkdtemp ( $dir )
_mkstemp ( $dir )
_mktemp ( ) : array Create a temporary file on the same filesystem as $this->association_dir.
_removeIfPresent ( $filename ) : boolean Attempt to remove a file, returning whether the file existed at the time of the call.
_rmtree ( $dir )
_safe64 ( $str )
_setup ( ) Make sure that the directories in which we store our data exist.
clean ( )
cleanupAssociations ( )
cleanupNonces ( )
destroy ( )
getAssociation ( $server_url, $handle = null ) : mixed Retrieve an association. If no handle is specified, return the association with the most recent issue time.
getAssociationFilename ( $server_url, $handle ) : string Create a unique filename for a given server url and handle. This implementation does not assume anything about the format of the handle. The filename that is returned will contain the domain name from the server URL for ease of human inspection of the data directory.
removeAssociation ( $server_url, $handle ) : boolean Remove an association if it exists. Do nothing if it does not.
storeAssociation ( $server_url, $association ) Store an association in the association directory.
useNonce ( $server_url, $timestamp, $salt ) : boolean Return whether this nonce is present. As a side effect, mark it as no longer present.

Описание методов

__construct() публичный Метод

Initializes a new {@link Auth_OpenID_FileStore}. This initializes the nonce and association directories, which are subdirectories of the directory passed in.
public __construct ( string $directory )
$directory string This is the directory to put the store directories in.

_allAssocs() публичный Метод

Remove expired entries from the database. This is potentially expensive, so only run when it is acceptable to take time.
public _allAssocs ( )

_filenameEscape() публичный Метод

public _filenameEscape ( $str )

_getAssociation() публичный Метод

public _getAssociation ( $filename )

_isFilenameSafe() публичный Метод

public _isFilenameSafe ( $char )

_listdir() публичный Метод

public _listdir ( $dir )

_mkdtemp() статический публичный Метод

static public _mkdtemp ( $dir )

_mkstemp() публичный Метод

public _mkstemp ( $dir )

_mktemp() публичный Метод

The temporary directory should not be cleaned if there are any processes using the store. If there is no active process using the store, it is safe to remove all of the files in the temporary directory.
public _mktemp ( ) : array
Результат array ($fd, $filename)

_removeIfPresent() публичный Метод

Attempt to remove a file, returning whether the file existed at the time of the call.
public _removeIfPresent ( $filename ) : boolean
Результат boolean $result True if the file was present, false if not.

_rmtree() публичный Метод

public _rmtree ( $dir )

_safe64() публичный Метод

public _safe64 ( $str )

_setup() публичный Метод

Make sure that the directories in which we store our data exist.
public _setup ( )

clean() публичный Метод

public clean ( )

cleanupAssociations() публичный Метод

public cleanupAssociations ( )

cleanupNonces() публичный Метод

public cleanupNonces ( )

destroy() публичный Метод

public destroy ( )

getAssociation() публичный Метод

Retrieve an association. If no handle is specified, return the association with the most recent issue time.
public getAssociation ( $server_url, $handle = null ) : mixed
Результат mixed $association

getAssociationFilename() публичный Метод

Create a unique filename for a given server url and handle. This implementation does not assume anything about the format of the handle. The filename that is returned will contain the domain name from the server URL for ease of human inspection of the data directory.
public getAssociationFilename ( $server_url, $handle ) : string
Результат string $filename

removeAssociation() публичный Метод

Remove an association if it exists. Do nothing if it does not.
public removeAssociation ( $server_url, $handle ) : boolean
Результат boolean $success

storeAssociation() публичный Метод

Store an association in the association directory.
public storeAssociation ( $server_url, $association )

useNonce() публичный Метод

Return whether this nonce is present. As a side effect, mark it as no longer present.
public useNonce ( $server_url, $timestamp, $salt ) : boolean
Результат boolean $present