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

Class: OpenID_Store_MDB2

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

Class Overview


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.


Author(s):

Copyright:

  • 2009 Bill Shupp

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 39]
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.


[ Top ]


Class Variables

$db =  null

[line 46]

Instance of MDB2
  • Access: protected

Type:   mixed


[ Top ]

$tableNames = array(
        'nonce'       => 'OpenIDNonces',
        'association' => 'OpenIDAssociations',
        'discovery'   => 'OpenIDDiscovery',
    )

[line 53]

Table names which you can override in a child class
  • Access: protected

Type:   array


[ Top ]



Method Detail

__construct (Constructor)   [line 70]

void __construct( array $options)

Calls MDB2::factory(). Connections are lazy loaded upon queries.
  • Throws: OpenID_Store_Exception on error or missing DSN in options
  • Access: public

Parameters:

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.

[ Top ]

createTables   [line 97]

OpenID_Store_MDB2 createTables( )

Creates tables
  • Throws: OpenID_Store_Exception on failure to create tables
  • Access: public

[ Top ]

deleteAssociation   [line 300]

OpenID_Store_MDB2 deleteAssociation( string $uri)

Deletes an association from the SQL server
  • Access: public

Parameters:

string   $uri   —  The OP Endpoint URL

[ Top ]

deleteNonce   [line 361]

OpenID_Store_MDB2 deleteNonce( string $nonce, string $opURL)

Deletes a nonce from the SQL server
  • Access: public

Parameters:

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

[ Top ]

getAssociation   [line 229]

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

Gets an association from the SQL server
  • Return: on success, false on failure
  • Access: public

Parameters:

string   $uri   —  The OP Endpoint URL
string   $handle   —  The association handle if available

[ Top ]

getDiscover   [line 175]

false getDiscover( string $identifier)

Gets an instance of OpenID_Discover from the SQL server if it exists.
  • Return: on failure, OpenID_Discover on success
  • Access: public

Parameters:

string   $identifier   —  The user supplied identifier

[ Top ]

getNonce   [line 318]

string getNonce( string $nonce, string $opURL)

Gets a nonce from the SQL server if it exists
  • Return: (nonce) on success, false on failure
  • Access: public

Parameters:

string   $nonce   —  The nonce to retrieve
string   $opURL   —  The OP Endpoint URL that it is associated with

[ Top ]

prepareExecute   [line 147]

MDB2_Result prepareExecute( string $sql, array $args)

A shortcut to handle the error checking of prepare()/execute() in one place.
  • Throws: OpenID_Store_Exception on error
  • Access: protected

Parameters:

string   $sql   —  The SQL to prepare
array   $args   —  The corresponding arguments

[ Top ]

setAssociation   [line 274]

OpenID_Store_MDB2 setAssociation( OpenID_Association $association)

Sets an association in the SQL server
  • Access: public

Parameters:

OpenID_Association   $association   —  An instance of OpenID_Association

[ Top ]

setDiscover   [line 204]

OpenID_Store_MDB2 setDiscover( OpenID_Discover $discover, [int $expire = 3600])

Adds discoverd infomation to the SQL server
  • Access: public

Parameters:

OpenID_Discover   $discover   —  The OpenID_Discover instance
int   $expire   —  The time (in seconds) that the cached object should live

[ Top ]

setNonce   [line 343]

OpenID_Store_MDB2 setNonce( string $nonce, string $opURL)

Sets a nonce in the SQL server
  • Access: public

Parameters:

string   $nonce   —  The nonce value to set
string   $opURL   —  The OP Endpoint URL it is associated with

[ Top ]


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