dblayer : allow the titles to be defined in public variable in plus of a function which can be overloaded
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1828 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
10
dblayer.php
10
dblayer.php
@@ -61,6 +61,8 @@ class dblayer extends PDO
|
||||
private $dsn = null;
|
||||
/** The field group delimiter */
|
||||
private $sep = "";
|
||||
/** Titles */
|
||||
public $titles = array ();
|
||||
|
||||
// TODO !!
|
||||
/** Create Table creation from $this->fields with engine abstraction
|
||||
@@ -784,8 +786,16 @@ class dblayer extends PDO
|
||||
if (count ($this->fields) === 0)
|
||||
throw new Exception (dgettext("domframework", "No Field defined"), 500);
|
||||
$arr = array ();
|
||||
if (count ($this->titles) !== 0)
|
||||
{
|
||||
foreach ($this->titles as $field=>$v)
|
||||
$arr[$field] = $field;
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ($this->fields as $field=>$v)
|
||||
$arr[$field] = $field;
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user