factory class for all dbo sources
Definition at line 10 of file db.class.php.
◆ __construct()
No instanciation for this class
Definition at line 49 of file db.class.php.
◆ get()
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.
◆ getCfg()
Get a db configuration value
- Parameters
-
- Returns
- mixed
Definition at line 125 of file db.class.php.
◆ getInstance()
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.
◆ init()
◆ isI18nName()
static isI18nName |
( |
|
$field | ) |
|
|
static |
indicate if a field is i18n
- Parameters
-
string | $name | Field name to test |
- Returns
- bool
Definition at line 135 of file db.class.php.
◆ log()
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 156 of file db.class.php.
◆ unI18nName()
static unI18nName |
( |
|
$field | ) |
|
|
static |
Remove the i18n indicator part of a field (if presente
- Parameters
-
- Returns
- string
Definition at line 145 of file db.class.php.
◆ $cfg
◆ $instances
◆ $log
◆ $tables
◆ FETCH_ASSOC
const FETCH_ASSOC = PDO::FETCH_ASSOC |
◆ FETCH_BOTH
const FETCH_BOTH = PDO::FETCH_BOTH |
◆ FETCH_COLUMN
const FETCH_COLUMN = PDO::FETCH_COLUMN |
◆ FETCH_NUM
const FETCH_NUM = PDO::FETCH_NUM |
◆ FETCH_ROWSET
const FETCH_ROWSET = PDO::FETCH_CLASS |
The documentation for this class was generated from the following file: