Subversion Repositories Applications.framework

Rev

Rev 239 | Rev 247 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 239 Rev 241
Line 12... Line 12...
12
 *
12
 *
13
 * @category	php 5.2
13
 * @category	php 5.2
14
 * @package	Framework
14
 * @package	Framework
15
 * @author		Aurélien PERONNET <aurelien@tela-botanica.org>
15
 * @author		Aurélien PERONNET <aurelien@tela-botanica.org>
16
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
16
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
17
 * @copyright	Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org)
17
 * @copyright	Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
18
 * @license	http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
18
 * @license	http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
19
 * @license	http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
19
 * @license	http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
20
 * @version	$Id: Bdd.php 239 2010-11-25 18:04:00Z jpm $
20
 * @version	$Id: Bdd.php 241 2010-12-06 15:19:07Z jpm $
21
 * @link		/doc/framework/
21
 * @link		/doc/framework/
22
 */
22
 */
23
class Bdd {
23
class Bdd {
24
	/** Constante stockant le squelette du message en cas d'erreur de requête sql. */
24
	/** Constante stockant le squelette du message en cas d'erreur de requête sql. */
25
	const ERREUR_REQUETE_TPL = 'Requête echec.\nFichier : %s.\nLigne : %s.\nMessage : %s.\nRequête : %s';
25
	const ERREUR_REQUETE_TPL = 'Requête echec.\nFichier : %s.\nLigne : %s.\nMessage : %s.\nRequête : %s';
Line 84... Line 84...
84
	/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/
84
	/** Tableau des noms des paramètres à définir dans le fichier de config car obligatoirement nécessaire à cette classe.*/
85
	protected $parametres_obligatoires = array('bdd_abstraction', 'bdd_protocole', 'bdd_serveur', 'bdd_nom', '');
85
	protected $parametres_obligatoires = array('bdd_abstraction', 'bdd_protocole', 'bdd_serveur', 'bdd_nom', '');
Line 86... Line 86...
86
	
86
	
87
	/** Constructeur par défaut, appelé à l'initialisation. */
87
	/** Constructeur par défaut, appelé à l'initialisation. */
88
	public function __construct() {
88
	public function __construct() {
89
		Debug::verifierParametresConfig($this->parametres_obligatoires);
89
		Config::verifierPresenceParametres($this->parametres_obligatoires);
90
		$this->abstraction = strtolower(Config::get('bdd_abstraction'));
90
		$this->abstraction = strtolower(Config::get('bdd_abstraction'));
91
		$this->type = Config::get('bdd_protocole');
91
		$this->type = Config::get('bdd_protocole');
92
		$this->hote = Config::get('bdd_serveur');
92
		$this->hote = Config::get('bdd_serveur');
93
		$this->bdd_nom = Config::get('bdd_nom');
93
		$this->bdd_nom = Config::get('bdd_nom');