16,8 → 16,6 |
* @copyright 1999-2014 Tela Botanica <accueil@tela-botanica.org> |
*/ |
// TODO : il faudrait déplacer les méthodes des sections de cette classe dans des classes séparées chargées via un Conteneur. |
require_once('Bdd2.php'); |
|
abstract class Cel { |
const ARRET_SERVICE = false; |
|
25,12 → 23,12 |
const TYPE_IMG = 'image'; |
|
// TODO: delete wrappers |
const SQL_MODE_ASSOC = Bdd2::SQL_MODE_ASSOC; |
const SQL_MODE_OBJET = Bdd2::SQL_MODE_OBJET; |
const SQL_RETOUR_COMPLET = Bdd2::SQL_RETOUR_COMPLET; |
const SQL_RETOUR_LIGNE = Bdd2::SQL_RETOUR_LIGNE; |
const SQL_RETOUR_COLONNE = Bdd2::SQL_RETOUR_COLONNE; |
const SQL_RETOUR_BRUT = Bdd2::SQL_RETOUR_BRUT; |
const SQL_MODE_ASSOC = Bdd::SQL_MODE_ASSOC; |
const SQL_MODE_OBJET = Bdd::SQL_MODE_OBJET; |
const SQL_RETOUR_COMPLET = Bdd::SQL_RETOUR_COMPLET; |
const SQL_RETOUR_LIGNE = Bdd::SQL_RETOUR_LIGNE; |
const SQL_RETOUR_COLONNE = Bdd::SQL_RETOUR_COLONNE; |
const SQL_RETOUR_BRUT = Bdd::SQL_RETOUR_BRUT; |
|
public $config; |
private $ressources; |
58,7 → 56,7 |
|
// Connection à la base de données |
if (self::$bdd === null) { // singleton à l'arrache |
self::$bdd = new Bdd2($this->config, 'database_cel'); |
self::$bdd = new Bdd($this->config, 'database_cel'); |
} |
|
// Nettoyage du _GET (sécurité) |
72,7 → 70,7 |
|
//+----------------------------------------------------------------------------------------------------------------+ |
protected function connecterPDO($config, $base = 'database_cel') { |
return new Bdd2($config, $base); |
return new Bdd($config, $base); |
} |
|
public static function db() { |