Add the public in functions of dblayer
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@1436 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
12
dblayer.php
12
dblayer.php
@@ -78,7 +78,7 @@ class dblayer extends PDO
|
||||
@param string|null $username Username to connect
|
||||
@param string|null $password Password to connect
|
||||
@param string|null $driver_options Driver options to the database */
|
||||
function __construct ($dsn, $username=null, $password=null,
|
||||
public function __construct ($dsn, $username=null, $password=null,
|
||||
$driver_options=null)
|
||||
{
|
||||
try
|
||||
@@ -112,7 +112,7 @@ class dblayer extends PDO
|
||||
|
||||
/** Create a new entry in the table. Datas must be an indexed array
|
||||
@param array $datas Datas to be recorded (column=>value)*/
|
||||
function create ($datas)
|
||||
public function create ($datas)
|
||||
{
|
||||
if ($this->db === null)
|
||||
throw new Exception (_("Database not connected"), 500);
|
||||
@@ -214,7 +214,7 @@ class dblayer extends PDO
|
||||
@param array|null $order Sort the columns by orientation
|
||||
$order = array (array ($key, $orientation), ...)
|
||||
$key=>column, $orientation=ASC/DESC */
|
||||
function read ($select=null, $display=null, $order=null)
|
||||
public function read ($select=null, $display=null, $order=null)
|
||||
{
|
||||
if ($this->db === null)
|
||||
throw new Exception (_("Database not connected"), 500);
|
||||
@@ -295,7 +295,7 @@ class dblayer extends PDO
|
||||
@param string|integer $updatekey The key applied on primary key to be
|
||||
updated
|
||||
@param array $datas The values to be updated */
|
||||
function update ($updatekey, $datas)
|
||||
public function update ($updatekey, $datas)
|
||||
{
|
||||
if ($this->db === null)
|
||||
throw new Exception (_("Database not connected"), 500);
|
||||
@@ -421,7 +421,7 @@ class dblayer extends PDO
|
||||
/** Delete a tuple identified by its primary key
|
||||
Return the number of deleted rows (can be 0 !)
|
||||
@param strin|integer $deletekey The key of primary key to be deleted */
|
||||
function delete ($deletekey)
|
||||
public function delete ($deletekey)
|
||||
{
|
||||
if ($this->db === null)
|
||||
throw new Exception ("Database not connected");
|
||||
@@ -444,6 +444,8 @@ class dblayer extends PDO
|
||||
$arr[$field] = $field;
|
||||
return $arr;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/** POC :
|
||||
|
||||
Reference in New Issue
Block a user