Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: OpenID

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5
Source code for file /openid/Auth/OpenID/DatabaseConnection.php

Documentation is available at DatabaseConnection.php

  1. <?php
  2.  
  3. /**
  4.  * The Auth_OpenID_DatabaseConnection class, which is used to emulate
  5.  * a PEAR database connection.
  6.  *
  7.  * @package OpenID
  8.  * @author JanRain, Inc. <[email protected]>
  9.  * @copyright 2005 Janrain, Inc.
  10.  * @license http://www.gnu.org/copyleft/lesser.html LGPL
  11.  */
  12.  
  13. /**
  14.  * An empty base class intended to emulate PEAR connection
  15.  * functionality in applications that supply their own database
  16.  * abstraction mechanisms.  See {@link Auth_OpenID_SQLStore} for more
  17.  * information.  You should subclass this class if you need to create
  18.  * an SQL store that needs to access its database using an
  19.  * application's database abstraction layer instead of a PEAR database
  20.  * connection.  Any subclass of Auth_OpenID_DatabaseConnection MUST
  21.  * adhere to the interface specified here.
  22.  *
  23.  * @package OpenID
  24.  */
  25.     /**
  26.      * Sets auto-commit mode on this database connection.
  27.      *
  28.      * @param bool $mode True if auto-commit is to be used; false if
  29.      *  not.
  30.      */
  31.     function autoCommit($mode)
  32.     {
  33.     }
  34.  
  35.     /**
  36.      * Run an SQL query with the specified parameters, if any.
  37.      *
  38.      * @param string $sql An SQL string with placeholders.  The
  39.      *  placeholders are assumed to be specific to the database engine
  40.      *  for this connection.
  41.      *
  42.      * @param array $params An array of parameters to insert into the
  43.      *  SQL string using this connection's escaping mechanism.
  44.      *
  45.      * @return mixed $result The result of calling this connection's
  46.      *  internal query function.  The type of result depends on the
  47.      *  underlying database engine.  This method is usually used when
  48.      *  the result of a query is not important, like a DDL query.
  49.      */
  50.     function query($sql$params array())
  51.     {
  52.     }
  53.  
  54.     /**
  55.      * Starts a transaction on this connection, if supported.
  56.      */
  57.     function begin()
  58.     {
  59.     }
  60.  
  61.     /**
  62.      * Commits a transaction on this connection, if supported.
  63.      */
  64.     function commit()
  65.     {
  66.     }
  67.  
  68.     /**
  69.      * Performs a rollback on this connection, if supported.
  70.      */
  71.     function rollback()
  72.     {
  73.     }
  74.  
  75.     /**
  76.      * Run an SQL query and return the first column of the first row
  77.      * of the result set, if any.
  78.      *
  79.      * @param string $sql An SQL string with placeholders.  The
  80.      *  placeholders are assumed to be specific to the database engine
  81.      *  for this connection.
  82.      *
  83.      * @param array $params An array of parameters to insert into the
  84.      *  SQL string using this connection's escaping mechanism.
  85.      *
  86.      * @return mixed $result The value of the first column of the
  87.      *  first row of the result set.  False if no such result was
  88.      *  found.
  89.      */
  90.     function getOne($sql$params array())
  91.     {
  92.     }
  93.  
  94.     /**
  95.      * Run an SQL query and return the first row of the result set, if
  96.      * any.
  97.      *
  98.      * @param string $sql An SQL string with placeholders.  The
  99.      *  placeholders are assumed to be specific to the database engine
  100.      *  for this connection.
  101.      *
  102.      * @param array $params An array of parameters to insert into the
  103.      *  SQL string using this connection's escaping mechanism.
  104.      *
  105.      * @return array $result The first row of the result set, if any,
  106.      *  keyed on column name.  False if no such result was found.
  107.      */
  108.     function getRow($sql$params array())
  109.     {
  110.     }
  111.  
  112.     /**
  113.      * Run an SQL query with the specified parameters, if any.
  114.      *
  115.      * @param string $sql An SQL string with placeholders.  The
  116.      *  placeholders are assumed to be specific to the database engine
  117.      *  for this connection.
  118.      *
  119.      * @param array $params An array of parameters to insert into the
  120.      *  SQL string using this connection's escaping mechanism.
  121.      *
  122.      * @return array $result An array of arrays representing the
  123.      *  result of the query; each array is keyed on column name.
  124.      */
  125.     function getAll($sql$params array())
  126.     {
  127.     }
  128. }
  129.  
  130. ?>

Documentation generated on Mon, 05 Mar 2007 20:56:12 +0000 by phpDocumentor 1.3.1