Subversion Repositories Applications.framework

Rev

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

Rev 427 Rev 429
Line 15... Line 15...
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) 2010, 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 427 2013-06-28 07:53:51Z raphael $
20
 * @version	$Id: Bdd.php 429 2013-07-24 08:31:57Z raphael $
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 111... Line 111...
111
	/** Initialise les constantes de classe à leur bonne valeur et déclenche une erreur si le protocole n'est pas bien défini. */
111
	/** Initialise les constantes de classe à leur bonne valeur et déclenche une erreur si le protocole n'est pas bien défini. */
112
	protected function initialiserProtocole() {
112
	protected function initialiserProtocole() {
113
		switch ($this->abstraction) {
113
		switch ($this->abstraction) {
114
			case self::ABSTRACTION_PDO :
114
			case self::ABSTRACTION_PDO :
115
				$this->ASSOC = PDO::FETCH_ASSOC;
115
				$this->ASSOC = PDO::FETCH_ASSOC;
116
				$this->OBJECT = PDO::FETCH_CLASS;
116
				$this->OBJECT = PDO::FETCH_OBJ;
117
				break;
117
				break;
118
			case self::ABSTRACTION_MYSQL :
118
			case self::ABSTRACTION_MYSQL :
119
				$this->ASSOC = 'mysql_fetch_assoc';
119
				$this->ASSOC = 'mysql_fetch_assoc';
120
				$this->OBJECT = 'mysql_fetch_object';
120
				$this->OBJECT = 'mysql_fetch_object';
121
				break;
121
				break;