Class OpenID_Store_CacheLite

Description

Implements interfaces:

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

Located in /OpenID/Store/CacheLite.php (line 35)


	
			
Variable Summary
Cache_Lite $cache
Method Summary
void __construct ([ $options = array()])
void deleteAssociation (string $uri)
void deleteDiscover (string $identifier)
void deleteNonce (string $nonce, string $opURL)
void ensureDirectoryExists (string $dir)
OpenID_Association getAssociation (string $uri, [string $handle = null])
OpenID_Discover getDiscover (string $identifier)
string getDiscoverCacheKey (string $identifier)
string getNonce (string $nonce, string $opURL)
string getNonceCacheKey (string $nonce, string $opURL)
void setAssociation (OpenID_Association $association)
void setDiscover (OpenID_Discover $discover, [int $expire = null])
void setNonce (string $nonce, string $opURL)
void setOptions (string $key, [string $expire = null])
Variables
Cache_Lite $cache = null (line 42)

Instance of Cache_Lite

  • access: protected
array $defaultOptions = array(
'cacheDir' => '/tmp',
'lifeTime' => 3600,
'hashedDirectoryLevel' => 2
)
(line 49)

Default options for Cache_Lite

  • access: protected
array $storeDirectories = array(
self::TYPE_ASSOCIATION => 'association',
self::TYPE_DISCOVER => 'discover',
self::TYPE_NONCE => 'nonce'
)
(line 60)

Sub-directory storage for each type of store

  • access: protected
Methods
Constructor __construct (line 73)

Instantiate Cache_Lite. Allows for options to be passed to Cache_Lite.

  • access: public
void __construct ([ $options = array()])
  • array $options: Options for Cache_Lite constructor
deleteAssociation (line 125)

Deletes an association from storage

  • access: public
void deleteAssociation (string $uri)
  • string $uri: OP Endpoint URI

Implementation of:
OpenID_Store_Interface::deleteAssociation()
Deletes an association from storage
deleteDiscover (line 175)

Deletes a cached OpenID_Discover object

  • access: public
void deleteDiscover (string $identifier)
  • string $identifier: The Identifier
deleteNonce (line 235)

Deletes a nonce from storage

  • access: public
void deleteNonce (string $nonce, string $opURL)
  • string $nonce: The nonce to delete
  • string $opURL: The OP endpoint URL it is associated with

Implementation of:
OpenID_Store_Interface::deleteNonce()
Deletes a nonce from storage
ensureDirectoryExists (line 286)

Make sure the given sub directory exists. If not, create it.

  • access: protected
void ensureDirectoryExists (string $dir)
  • string $dir: The full path to the sub director we plan to write to
getAssociation (line 87)

Gets an OpenID_Assocation instance from storage

  • access: public
OpenID_Association getAssociation (string $uri, [string $handle = null])
  • string $uri: The OP endpoint URI to get an association for
  • string $handle: The handle if available

Implementation of:
OpenID_Store_Interface::getAssociation()
Gets an OpenID_Assocation instance from storage
getDiscover (line 140)

Gets an OpenID_Discover object from storage

  • access: public
OpenID_Discover getDiscover (string $identifier)
  • string $identifier: The normalized identifier that discovery was performed on

Implementation of:
OpenID_Store_Interface::getDiscover()
Gets an OpenID_Discover object from storage
getDiscoverCacheKey (line 191)

Common method for creating a cache key based on the normalized identifier

  • return: md5 of the normalized identifier
  • access: protected
string getDiscoverCacheKey (string $identifier)
  • string $identifier: User supplied identifier
getNonce (line 204)

Gets a nonce from storage

  • access: public
string getNonce (string $nonce, string $opURL)
  • string $nonce: The nonce itself
  • string $opURL: The OP Endpoint URL it was used with

Implementation of:
OpenID_Store_Interface::getNonce()
Gets a nonce from storage
getNonceCacheKey (line 251)

Common method for creating a nonce key based on both the nonce and the OP endpoint URL

  • return: Cache key
  • access: protected
string getNonceCacheKey (string $nonce, string $opURL)
  • string $nonce: The nonce
  • string $opURL: The OP endpoint URL it is associated with
setAssociation (line 107)

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

  • access: public
void setAssociation (OpenID_Association $association)

Implementation of:
OpenID_Store_Interface::setAssociation()
Stores an OpenID_Association instance. Details (such as endpoint url and exiration) are retrieved from the object itself.
setDiscover (line 159)

Stores an instance of OpenID_Discover

  • access: public
void setDiscover (OpenID_Discover $discover, [int $expire = null])
  • OpenID_Discover $discover: Instance of OpenID_Discover
  • int $expire: How long to cache it for, in seconds

Implementation of:
OpenID_Store_Interface::setDiscover()
Stores an instance of OpenID_Discover
setNonce (line 220)

Stores a nonce for an OP endpoint URL

  • access: public
void setNonce (string $nonce, string $opURL)
  • string $nonce: The nonce itself
  • string $opURL: The OP endpoint URL it was associated with

Implementation of:
OpenID_Store_Interface::setNonce()
Stores a nonce for an OP endpoint URL
setOptions (line 265)

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
void setOptions (string $key, [string $expire = null])
  • string $key: The sub-directory of the cacheDir
  • string $expire: The cache lifetime (expire) to be used

Documentation generated on Tue, 15 Dec 2009 19:00:52 -0800 by phpDocumentor 1.4.3