Static Public Member Functions | Data Fields | Static Protected Member Functions | Private Member Functions | Static Private Attributes

db Class Reference

Static Public Member Functions

static getInstance ($cfg=null)
static get ($type, $table, array $prm=array())
static getCfg ($key)
static isI18nName ($field)
static unI18nName ($field)
static log ($sql=null, $bind=null)

Data Fields

const FETCH_ASSOC = PDO::FETCH_ASSOC
const FETCH_BOTH = PDO::FETCH_BOTH
const FETCH_NUM = PDO::FETCH_NUM
const FETCH_ROWSET = PDO::FETCH_CLASS
const FETCH_COLUMN = PDO::FETCH_COLUMN

Static Protected Member Functions

static init ()

Private Member Functions

 __construct ()

Static Private Attributes

static $instances = array()
static $cfg = null
static $tables = array()
static $log = array()

Detailed Description

factory class for all dbo sources

Definition at line 10 of file db.class.php.


Constructor & Destructor Documentation

__construct (  )  [private]

No instanciation for this class

Definition at line 49 of file db.class.php.


Member Function Documentation

static get ( type,
table,
array $  prm = array() 
) [static]

Get a db object

Parameters:
string $type Element type (table, rowset or row)
db_table|string $table
array $prm Array parameter for the factory
Returns:
db_table|db_rowset|db_row

Definition at line 87 of file db.class.php.

static getCfg ( key  )  [static]

Get a db configuration value

Parameters:
string $key Ket value
Returns:
mixed

Definition at line 125 of file db.class.php.

static getInstance ( cfg = null  )  [static]

Get db instance

Parameters:
string|array $cfg String if use a configuration (and retrieve a singleton) or array to have an unique connection. Array must contain key use to specify the type to use
Returns:
db_abstract The instance requested

Definition at line 58 of file db.class.php.

static init (  )  [static, protected]

Init the config object

Definition at line 169 of file db.class.php.

static isI18nName ( field  )  [static]

indicate if a field is i18n

Parameters:
string $name Field name to test
Returns:
bool

Definition at line 136 of file db.class.php.

static log ( sql = null,
bind = null 
) [static]

Add a new query log or get the whole array of log

Parameters:
string|null $sql The query or null to get the whole log
array|null $bind Values Binded or null
Returns:
void|array Array if $sql is null

Definition at line 157 of file db.class.php.

static unI18nName ( field  )  [static]

Remove the i18n indicator part of a field (if presente

Parameters:
string $field
Returns:
string

Definition at line 146 of file db.class.php.


Field Documentation

$cfg = null [static, private]

Definition at line 30 of file db.class.php.

$instances = array() [static, private]

Definition at line 23 of file db.class.php.

$log = array() [static, private]

Definition at line 44 of file db.class.php.

$tables = array() [static, private]

Definition at line 37 of file db.class.php.

const FETCH_ASSOC = PDO::FETCH_ASSOC

Definition at line 12 of file db.class.php.

const FETCH_BOTH = PDO::FETCH_BOTH

Definition at line 13 of file db.class.php.

const FETCH_COLUMN = PDO::FETCH_COLUMN

Definition at line 16 of file db.class.php.

const FETCH_NUM = PDO::FETCH_NUM

Definition at line 14 of file db.class.php.

const FETCH_ROWSET = PDO::FETCH_CLASS

Definition at line 15 of file db.class.php.


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Enumerations
Generated on Tue May 8 2012 16:02:25 for nyroFwk by doxygen 1.7.1