OpenID
[ class tree: OpenID ] [ index: OpenID ] [ all elements ]

Class: OpenID_Store_CacheLite

Source Location: /OpenID-0.4.0/OpenID/Store/CacheLite.php

Class Overview


PEAR Cache_Lite driver for storage. This is the default driver used.


Author(s):

Copyright:

  • 2009 Bill Shupp, Rich Schumacher

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 35]
PEAR Cache_Lite driver for storage. This is the default driver used.


[ Top ]


Class Variables

$cache =  null

[line 42]

Instance of Cache_Lite
  • Access: protected

Type:   Cache_Lite


[ Top ]

$defaultOptions = array(
        'cacheDir'             => '/tmp',
        'lifeTime'             => 3600,
        'hashedDirectoryLevel' => 2
    )

[line 56]

Default options for Cache_Lite
  • Access: protected

Type:   array


[ Top ]

$options = array()

[line 49]

Options currently in use
  • Access: protected

Type:   array


[ Top ]

$storeDirectories = array(
        self::TYPE_ASSOCIATION => 'association',
        self::TYPE_DISCOVER    => 'discover',
        self::TYPE_NONCE       => 'nonce'
    )

[line 67]

Sub-directory storage for each type of store
  • Access: protected

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 80]

void __construct( [array $options = array()])

Instantiate Cache_Lite. Allows for options to be passed to Cache_Lite.
  • Access: public

Parameters:

array   $options   —  Options for Cache_Lite constructor

[ Top ]

deleteAssociation   [line 134]

void deleteAssociation( string $uri)

Deletes an association from storage
  • Access: public

Parameters:

string   $uri   —  OP Endpoint URI

[ Top ]

deleteDiscover   [line 184]

void deleteDiscover( string $identifier)

Deletes a cached OpenID_Discover object
  • Access: public

Parameters:

string   $identifier   —  The Identifier

[ Top ]

deleteNonce   [line 244]

void deleteNonce( string $nonce, string $opURL)

Deletes a nonce from storage
  • Access: public

Parameters:

string   $nonce   —  The nonce to delete
string   $opURL   —  The OP endpoint URL it is associated with

[ Top ]

ensureDirectoryExists   [line 311]

void ensureDirectoryExists( string $dir)

Make sure the given sub directory exists. If not, create it.
  • Access: protected

Parameters:

string   $dir   —  The full path to the sub director we plan to write to

[ Top ]

getAssociation   [line 94]

OpenID_Association getAssociation( string $uri, [string $handle = null])

Gets an OpenID_Assocation instance from storage
  • Access: public

Parameters:

string   $uri   —  The OP endpoint URI to get an association for
string   $handle   —  The handle if available

[ Top ]

getDiscover   [line 149]

OpenID_Discover getDiscover( string $identifier)

Gets an OpenID_Discover object from storage
  • Access: public

Parameters:

string   $identifier   —  The normalized identifier that discovery was performed on

[ Top ]

getDiscoverCacheKey   [line 200]

string getDiscoverCacheKey( string $identifier)

Common method for creating a cache key based on the normalized identifier
  • Return: md5 of the normalized identifier
  • Access: protected

Parameters:

string   $identifier   —  User supplied identifier

[ Top ]

getNonce   [line 213]

string getNonce( string $nonce, string $opURL)

Gets a nonce from storage
  • Access: public

Parameters:

string   $nonce   —  The nonce itself
string   $opURL   —  The OP Endpoint URL it was used with

[ Top ]

getNonceCacheKey   [line 260]

string getNonceCacheKey( string $nonce, string $opURL)

Common method for creating a nonce key based on both the nonce and the OP endpoint URL
  • Return: Cache key
  • Access: protected

Parameters:

string   $nonce   —  The nonce
string   $opURL   —  The OP endpoint URL it is associated with

[ Top ]

removeFromCache   [line 296]

result removeFromCache( mixed $key)

This is a warpper for Cache_Lite::remove(), since it generates strict warnings.
  • Return: of Cache_Lite::remove(), without the strict warnings
  • Access: protected

Parameters:

mixed   $key   —  The key to remove from cache

[ Top ]

setAssociation   [line 114]

void setAssociation( OpenID_Association $association)

Stores an OpenID_Association instance. Details (such as endpoint url and expiration) are retrieved from the object itself.
  • Access: public

Parameters:

OpenID_Association   $association   —  Instance of OpenID_Association

[ Top ]

setDiscover   [line 168]

void setDiscover( OpenID_Discover $discover, [int $expire = null])

Stores an instance of OpenID_Discover
  • Access: public

Parameters:

OpenID_Discover   $discover   —  Instance of OpenID_Discover
int   $expire   —  How long to cache it for, in seconds

[ Top ]

setNonce   [line 229]

void setNonce( string $nonce, string $opURL)

Stores a nonce for an OP endpoint URL
  • Access: public

Parameters:

string   $nonce   —  The nonce itself
string   $opURL   —  The OP endpoint URL it was associated with

[ Top ]

setOptions   [line 274]

void setOptions( string $key, [string $expire = null])

Sets options for Cache_Lite based on the needs of the current method.

Options set include the subdirectory to be used, and the expiration.

  • Access: protected

Parameters:

string   $key   —  The sub-directory of the cacheDir
string   $expire   —  The cache lifetime (expire) to be used

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:57:48 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.