-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2338679
commit 6d93acf
Showing
1 changed file
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,15 +6,15 @@ | |
* | ||
* @author LEGAGNEUR Matthieu <[email protected]> | ||
*/ | ||
class bdd extends singleton{ | ||
class bdd extends singleton { | ||
|
||
/** | ||
* Instance de PDO | ||
* | ||
* @var PDO Instance de PDO | ||
*/ | ||
private $_pdo; | ||
|
||
/** | ||
* Tableau de débogage | ||
* @var array Tableau de débogage | ||
|
@@ -92,6 +92,16 @@ public function verif_email($email) { | |
return boolval(filter_var($email, FILTER_VALIDATE_EMAIL)); | ||
} | ||
|
||
/** | ||
* Convertis un json provenant de la base de donné en tableau | ||
* | ||
* @param string $json json provenant de la base de donné | ||
* @return array Tableau de donnée | ||
*/ | ||
public function json_decode($json) { | ||
return json_decode(strtr($json, [""" => '"']), true); | ||
} | ||
|
||
/** | ||
* Exécute une requête type update, insert ou delete. | ||
* Pour plus de securité: voir la méthode protect_var. | ||
|