Documentation TYPO3 par Ameos

DB Class Reference

List of all members.

Public Member Functions

factory ($type)
connect ($dsn, $options=false)
 apiVersion ()
 isError ($value)
 isWarning ($value)
 parseDSN ($dsn)
 assertExtension ($name)

Detailed Description

The main "DB" class is simply a container class with some static methods for creating DB objects as well as some utility functions common to all parts of DB.

Definition at line 101 of file

Member Function Documentation

& DB::factory ( type  ) 

Create a new DB object for the specified database type

$type string database type, for example "mysql"
object a newly created DB object, or a DB error code on error

Definition at line 112 of file

& DB::connect ( dsn,
options = false 

Create a new DB object and connect to the specified database

$dsn mixed "data source name", see the DB::parseDSN method for a description of the dsn format. Can also be specified as an array of the format returned by DB::parseDSN.
$options mixed if boolean (or scalar), tells whether this connection should be persistent (for backends that support this). This parameter can also be an array of options, see DB_common::setOption for more information on connection options.
object a newly created DB connection object, or a DB error object on error
See also:


Definition at line 139 of file

References parseDSN().

DB::apiVersion (  ) 

Return the DB API version

int the DB API version number

Definition at line 199 of file

DB::isError ( value  ) 

Tell whether a result code from a DB method is an error

$value int result code
bool whether $value is an error

Definition at line 211 of file

Referenced by Auth_Container_ADOdb::addUser(), Auth_Container_ADOdb::fetchData(), Auth_Container_ADOdb::listUsers(), and Auth_Container_ADOdb::removeUser().

DB::isWarning ( value  ) 

Tell whether a result code from a DB method is a warning. Warnings differ from errors in that they are generated by DB, and are not fatal.

$value mixed result value
bool whether $value is a warning

Definition at line 229 of file

DB::assertExtension ( name  ) 

Load a PHP database extension if it is not loaded already.


$name the base name of the extension (without the .so or .dll suffix)
bool true if the extension was already or successfully loaded, false if it could not be loaded

Definition at line 361 of file

The documentation for this class was generated from the following file:

Généré par Les spécialistes TYPO3 avec  doxygen 1.4.6