[ Index ]

PHP Cross Reference of Joomla 1.5.26 DE

title

Body

[close]

/libraries/openid/Auth/OpenID/ -> SQLStore.php (summary)

SQL-backed OpenID stores. PHP versions 4 and 5

Author: JanRain, Inc. <openid@janrain.com>
Copyright: 2005-2008 Janrain, Inc.
License: http://www.apache.org/licenses/LICENSE-2.0 Apache
File Size: 572 lines (18 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Auth_OpenID_SQLStore:: (25 methods):
  Auth_OpenID_SQLStore()
  tableExists()
  isError()
  resultToBool()
  setSQL()
  reset()
  _verifySQL()
  _fixSQL()
  blobDecode()
  blobEncode()
  createTables()
  create_nonce_table()
  create_assoc_table()
  _set_assoc()
  storeAssociation()
  _get_assoc()
  _get_assocs()
  removeAssociation()
  getAssociation()
  _add_nonce()
  useNonce()
  _octify()
  _unoctify()
  cleanupNonces()
  cleanupAssociations()


Class: Auth_OpenID_SQLStore  - X-Ref

This is the parent class for the SQL stores, which contains the
logic common to all of the SQL stores.

The table names used are determined by the class variables
associations_table_name and nonces_table_name.  To change the name
of the tables used, pass new table names into the constructor.

To create the tables with the proper schema, see the createTables
method.

This class shouldn't be used directly.  Use one of its subclasses
instead, as those contain the code necessary to use a specific
database.  If you're an OpenID integrator and you'd like to create
an SQL-driven store that wraps an application's database
abstraction, be sure to create a subclass of
{@link Auth_OpenID_DatabaseConnection} that calls the application's
database abstraction calls.  Then, pass an instance of your new
database connection class to your SQLStore subclass constructor.

All methods other than the constructor and createTables should be
considered implementation details.

Auth_OpenID_SQLStore($connection,$associations_table = null,$nonces_table = null)   X-Ref
This creates a new SQLStore instance.  It requires an
established database connection be given to it, and it allows
overriding the default table names.

param: connection $connection This must be an established
param: associations_table: This is an optional parameter to
param: nonces_table: This is an optional parameter to specify

tableExists($table_name)   X-Ref
No description

isError($value)   X-Ref
Returns true if $value constitutes a database error; returns
false otherwise.


resultToBool($obj)   X-Ref
Converts a query result to a boolean.  If the result is a
database error according to $this->isError(), this returns
false; otherwise, this returns true.


setSQL()   X-Ref
This method should be overridden by subclasses.  This method is
called by the constructor to set values in $this->sql, which is
an array keyed on sql name.


reset()   X-Ref
Resets the store by removing all records from the store's
tables.


_verifySQL()   X-Ref


_fixSQL()   X-Ref


blobDecode($blob)   X-Ref
No description

blobEncode($str)   X-Ref
No description

createTables()   X-Ref
No description

create_nonce_table()   X-Ref
No description

create_assoc_table()   X-Ref
No description

_set_assoc($server_url, $handle, $secret, $issued,$lifetime, $assoc_type)   X-Ref


storeAssociation($server_url, $association)   X-Ref
No description

_get_assoc($server_url, $handle)   X-Ref


_get_assocs($server_url)   X-Ref


removeAssociation($server_url, $handle)   X-Ref
No description

getAssociation($server_url, $handle = null)   X-Ref
No description

_add_nonce($server_url, $timestamp, $salt)   X-Ref


useNonce($server_url, $timestamp, $salt)   X-Ref
No description

_octify($str)   X-Ref
"Octifies" a binary string by returning a string with escaped
octal bytes.  This is used for preparing binary data for
PostgreSQL BYTEA fields.


_unoctify($str)   X-Ref
"Unoctifies" octal-escaped data from PostgreSQL and returns the
resulting ASCII (possibly binary) string.


cleanupNonces()   X-Ref
No description

cleanupAssociations()   X-Ref
No description



Generated: Wed Mar 28 15:54:07 2012 Cross-referenced by PHPXref 0.7.1