ona  18.1.1
About: OpenNetAdmin provides a database managed inventory of your IP network (with Web and CLI interface).
  Fossies Dox: ona-18.1.1.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

DB Class Reference

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 99 of file adodb-pear.inc.php.

Member Function Documentation

◆ apiVersion()

DB::apiVersion ( )

Return the DB API version

int the DB API version number

Definition at line 197 of file adodb-pear.inc.php.

◆ assertExtension()

DB::assertExtension (   $name)

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

@access public

$namethe 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 359 of file adodb-pear.inc.php.

◆ connect()

DB::connect (   $dsn,
  $options = false 

Create a new DB object and connect to the specified database

$dsnmixed "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.
$optionsmixed 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 137 of file adodb-pear.inc.php.

References $type, ADODB_PEAR_Error(), and parseDSN().

◆ factory()

DB::factory (   $type)

Create a new DB object for the specified database type

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

Definition at line 110 of file adodb-pear.inc.php.

References $type.

◆ isError()

DB::isError (   $value)

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

$valueint result code
bool whether $value is an error

Definition at line 209 of file adodb-pear.inc.php.

◆ isWarning()

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.

$valuemixed result value
bool whether $value is a warning

Definition at line 227 of file adodb-pear.inc.php.

◆ parseDSN()

DB::parseDSN (   $dsn)

Definition at line 268 of file adodb-pear.inc.php.

Referenced by connect().

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