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:
2014-06-11 12:23:19 +00:00
parent 9ce72830e1
commit 87b4c843ef

View File

@@ -78,7 +78,7 @@ class dblayer extends PDO
@param string|null $username Username to connect @param string|null $username Username to connect
@param string|null $password Password to connect @param string|null $password Password to connect
@param string|null $driver_options Driver options to the database */ @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) $driver_options=null)
{ {
try try
@@ -112,7 +112,7 @@ class dblayer extends PDO
/** Create a new entry in the table. Datas must be an indexed array /** Create a new entry in the table. Datas must be an indexed array
@param array $datas Datas to be recorded (column=>value)*/ @param array $datas Datas to be recorded (column=>value)*/
function create ($datas) public function create ($datas)
{ {
if ($this->db === null) if ($this->db === null)
throw new Exception (_("Database not connected"), 500); throw new Exception (_("Database not connected"), 500);
@@ -214,7 +214,7 @@ class dblayer extends PDO
@param array|null $order Sort the columns by orientation @param array|null $order Sort the columns by orientation
$order = array (array ($key, $orientation), ...) $order = array (array ($key, $orientation), ...)
$key=>column, $orientation=ASC/DESC */ $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) if ($this->db === null)
throw new Exception (_("Database not connected"), 500); 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 @param string|integer $updatekey The key applied on primary key to be
updated updated
@param array $datas The values to be updated */ @param array $datas The values to be updated */
function update ($updatekey, $datas) public function update ($updatekey, $datas)
{ {
if ($this->db === null) if ($this->db === null)
throw new Exception (_("Database not connected"), 500); throw new Exception (_("Database not connected"), 500);
@@ -421,7 +421,7 @@ class dblayer extends PDO
/** Delete a tuple identified by its primary key /** Delete a tuple identified by its primary key
Return the number of deleted rows (can be 0 !) Return the number of deleted rows (can be 0 !)
@param strin|integer $deletekey The key of primary key to be deleted */ @param strin|integer $deletekey The key of primary key to be deleted */
function delete ($deletekey) public function delete ($deletekey)
{ {
if ($this->db === null) if ($this->db === null)
throw new Exception ("Database not connected"); throw new Exception ("Database not connected");
@@ -444,6 +444,8 @@ class dblayer extends PDO
$arr[$field] = $field; $arr[$field] = $field;
return $arr; return $arr;
} }
} }
/** POC : /** POC :