Auth_OpenID_SQLStore Auth_OpenID_SQLStore(
connection
$connection, [associations_table:
$associations_table = null], [nonces_table:
$nonces_table = null]
)
|
|
This creates a new SQLStore instance. It requires an established database connection be given to it, and it allows overriding the default table names.
Parameters:
|
connection |
$connection: |
This must be an established connection to a database of the correct type for the SQLStore subclass you're using. This must either be an PEAR DB connection handle or an instance of a subclass of Auth_OpenID_DatabaseConnection. |
|
associations_table: |
$associations_table: |
This is an optional parameter to specify the name of the table used for storing associations. The default value is 'oid_associations'. |
|
nonces_table: |
$nonces_table: |
This is an optional parameter to specify the name of the table used for storing nonces. The default value is 'oid_nonces'. |
void create_assoc_table(
)
|
|
void create_nonce_table(
)
|
|
void getAssociation(
$server_url, [
$handle = null]
)
|
|
Parameters:
Redefinition of:
- Auth_OpenID_OpenIDStore::getAssociation()
- This method returns an Association object from storage that matches the server URL and, if specified, handle. It returns null if no such association is found or if the matching association is expired.
Returns true if $value constitutes a database error; returns false otherwise.
Parameters:
void removeAssociation(
$server_url,
$handle
)
|
|
Parameters:
Redefinition of:
- Auth_OpenID_OpenIDStore::removeAssociation()
- This method removes the matching association if it's found, and returns whether the association was removed or not.
Resets the store by removing all records from the store's tables.
Redefinition of:
- Auth_OpenID_OpenIDStore::reset()
- Removes all entries from the store; implementation is optional.
void resultToBool(
$obj
)
|
|
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.
Parameters:
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.
Redefined in descendants as:
void storeAssociation(
$server_url,
$association
)
|
|
Parameters:
|
|
$server_url: |
|
|
|
$association: |
|
Redefinition of:
- Auth_OpenID_OpenIDStore::storeAssociation()
- This method puts an Association object into storage, retrievable by server URL and handle.
void tableExists(
$table_name
)
|
|
Parameters: