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

Class: Auth_OpenID_DatabaseConnection

Source Location: /zp-extensions/federated_logon/Auth/OpenID/DatabaseConnection.php

Class Auth_OpenID_DatabaseConnection

Class Overview

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 /zp-extensions/federated_logon/Auth/OpenID/DatabaseConnection.php [line 25]



		
		
		
		

Methods

[ Top ]
Method Summary
void   autoCommit()   Sets auto-commit mode on this database connection.
void   begin()   Starts a transaction on this connection, if supported.
void   commit()   Commits a transaction on this connection, if supported.
array   getAll()   Run an SQL query with the specified parameters, if any.
mixed   getOne()   Run an SQL query and return the first column of the first row of the result set, if any.
array   getRow()   Run an SQL query and return the first row of the result set, if any.
mixed   query()   Run an SQL query with the specified parameters, if any.
void   rollback()   Performs a rollback on this connection, if supported.

[ Top ]
Methods
autoCommit  [line 32]

  void autoCommit( bool $mode  )

Sets auto-commit mode on this database connection.

Parameters:
bool   $mode:  True if auto-commit is to be used; false if not.


[ Top ]
begin  [line 58]

  void begin( )

Starts a transaction on this connection, if supported.



[ Top ]
commit  [line 65]

  void commit( )

Commits a transaction on this connection, if supported.



[ Top ]
getAll  [line 126]

  array getAll( string $sql, [array $params = array()]  )

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

Parameters:
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.

API Tags:
Return:  An array of arrays representing the result of the query; each array is keyed on column name.


[ Top ]
getOne  [line 91]

  mixed getOne( string $sql, [array $params = array()]  )

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

Parameters:
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.

API Tags:
Return:  The value of the first column of the first row of the result set. False if no such result was found.


[ Top ]
getRow  [line 109]

  array getRow( string $sql, [array $params = array()]  )

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

Parameters:
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.

API Tags:
Return:  The first row of the result set, if any, keyed on column name. False if no such result was found.


[ Top ]
query  [line 51]

  mixed query( string $sql, [array $params = array()]  )

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

Parameters:
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.

API Tags:
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.


[ Top ]
rollback  [line 72]

  void rollback( )

Performs a rollback on this connection, if supported.



[ Top ]

Documentation generated on Tue, 20 Dec 2011 16:07:08 +0100 by phpDocumentor 1.4.3