Class Auth_OpenID_DatabaseConnection

Description

An empty base class intended to emulate PEAR connection

functionality in applications that supply their own database abstraction mechanisms. See Auth_OpenID_SQLStore for more information. You should subclass this class if you need to create an SQL store that needs to access its database using an application's database abstraction layer instead of a PEAR database connection. Any subclass of Auth_OpenID_DatabaseConnection MUST adhere to the interface specified here.

Located in /Auth/OpenID/DatabaseConnection.php (line 25)


	
			
Method Summary
 void autoCommit (bool $mode)
 void begin ()
 void commit ()
 array getAll (string $sql, [array $params = array()])
 mixed getOne (string $sql, [array $params = array()])
 array getRow (string $sql, [array $params = array()])
 mixed query (string $sql, [array $params = array()])
 void rollback ()
Methods
autoCommit (line 32)

Sets auto-commit mode on this database connection.

void autoCommit (bool $mode)
  • bool $mode: True if auto-commit is to be used; false if not.
begin (line 58)

Starts a transaction on this connection, if supported.

void begin ()
commit (line 65)

Commits a transaction on this connection, if supported.

void commit ()
getAll (line 126)

Run an SQL query with the specified parameters, if any.

  • return: An array of arrays representing the result of the query; each array is keyed on column name.
array getAll (string $sql, [array $params = array()])
  • string $sql: An SQL string with placeholders. The placeholders are assumed to be specific to the database engine for this connection.
  • array $params: An array of parameters to insert into the SQL string using this connection's escaping mechanism.
getOne (line 91)

Run an SQL query and return the first column of the first row of the result set, if any.

  • return: The value of the first column of the first row of the result set. False if no such result was found.
mixed getOne (string $sql, [array $params = array()])
  • string $sql: An SQL string with placeholders. The placeholders are assumed to be specific to the database engine for this connection.
  • array $params: An array of parameters to insert into the SQL string using this connection's escaping mechanism.
getRow (line 109)

Run an SQL query and return the first row of the result set, if any.

  • return: The first row of the result set, if any, keyed on column name. False if no such result was found.
array getRow (string $sql, [array $params = array()])
  • string $sql: An SQL string with placeholders. The placeholders are assumed to be specific to the database engine for this connection.
  • array $params: An array of parameters to insert into the SQL string using this connection's escaping mechanism.
query (line 51)

Run an SQL query with the specified parameters, if any.

  • return: The result of calling this connection's internal query function. The type of result depends on the underlying database engine. This method is usually used when the result of a query is not important, like a DDL query.
mixed query (string $sql, [array $params = array()])
  • string $sql: An SQL string with placeholders. The placeholders are assumed to be specific to the database engine for this connection.
  • array $params: An array of parameters to insert into the SQL string using this connection's escaping mechanism.
rollback (line 72)

Performs a rollback on this connection, if supported.

void rollback ()

Documentation generated on Thu, 29 Jul 2010 13:58:43 -0700 by phpDocumentor 1.4.3