Class OpenID_Store_MDB2

Description

Implements interfaces:

A first pass at SQL support via MDB2. This may have some MySQL specific things so it might get refactored a bit to support other DBs.

Located in /OpenID/Store/MDB2.php (line 39)


	
			
Variable Summary
mixed $db
array $tableNames
Method Summary
void __construct ( $options)
OpenID_Store_MDB2 deleteNonce (string $nonce, string $opURL)
OpenID_Association getAssociation (string $uri, [string $handle = null])
false getDiscover (string $identifier)
string getNonce (string $nonce, string $opURL)
MDB2_Result prepareExecute (string $sql,  $args)
OpenID_Store_MDB2 setDiscover (OpenID_Discover $discover, [int $expire = 3600])
OpenID_Store_MDB2 setNonce (string $nonce, string $opURL)
Variables
mixed $db = null (line 46)

Instance of MDB2

  • access: protected
array $tableNames = array(
'nonce' => 'OpenIDNonces',
'association' => 'OpenIDAssociations',
'discovery' => 'OpenIDDiscovery',
)
(line 53)

Table names which you can override in a child class

  • access: protected
Methods
Constructor __construct (line 70)

Calls MDB2::factory(). Connections are lazy loaded upon queries.

  • throws: OpenID_Store_Exception on error or missing DSN in options
  • access: public
void __construct ( $options)
  • array $options: Array of options to pass to MDB2::factory(). Note that you must also include the key 'dsn', which is used as the first argument to MDB2::factory(), and is not passed with the options argument.
createTables (line 91)

Creates tables

  • throws: OpenID_Store_Exception on failure to create tables
  • access: public
OpenID_Store_MDB2 createTables ()
deleteAssociation (line 279)

Deletes an association from the SQL server

  • access: public
OpenID_Store_MDB2 deleteAssociation (string $uri)
  • string $uri: The OP Endpoint URL

Implementation of:
OpenID_Store_Interface::deleteAssociation()
Deletes an association from storage
deleteNonce (line 340)

Deletes a nonce from the SQL server

  • access: public
OpenID_Store_MDB2 deleteNonce (string $nonce, string $opURL)
  • string $nonce: The nonce value
  • string $opURL: The OP Endpoint URL it is associated with

Implementation of:
OpenID_Store_Interface::deleteNonce()
Deletes a nonce from storage
getAssociation (line 210)

Gets an association from the SQL server

  • return: on success, false on failure
  • access: public
OpenID_Association getAssociation (string $uri, [string $handle = null])
  • string $uri: The OP Endpoint URL
  • string $handle: The association handle if available

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

Gets an instance of OpenID_Discover from the SQL server if it exists.

  • return: on failure, OpenID_Discover on success
  • access: public
false getDiscover (string $identifier)
  • string $identifier: The user supplied identifier

Implementation of:
OpenID_Store_Interface::getDiscover()
Gets an OpenID_Discover object from storage
getNonce (line 297)

Gets a nonce from the SQL server if it exists

  • return: (nonce) on success, false on failure
  • access: public
string getNonce (string $nonce, string $opURL)
  • string $nonce: The nonce to retrieve
  • string $opURL: The OP Endpoint URL that it is associated with

Implementation of:
OpenID_Store_Interface::getNonce()
Gets a nonce from storage
prepareExecute (line 139)

A shortcut to handle the error checking of prepare()/execute() in one place.

  • throws: OpenID_Store_Exception on error
  • access: protected
MDB2_Result prepareExecute (string $sql,  $args)
  • string $sql: The SQL to prepare
  • array $args: The corresponding arguments
setAssociation (line 253)

Sets an association in the SQL server

  • access: public
OpenID_Store_MDB2 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 190)

Adds discoverd infomation to the SQL server

  • access: public
OpenID_Store_MDB2 setDiscover (OpenID_Discover $discover, [int $expire = 3600])
  • OpenID_Discover $discover: The OpenID_Discover instance
  • int $expire: The time (in seconds) that the cached object should live

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

Sets a nonce in the SQL server

  • access: public
OpenID_Store_MDB2 setNonce (string $nonce, string $opURL)
  • string $nonce: The nonce value to set
  • string $opURL: The OP Endpoint URL it is associated with

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

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