Subversion Repositories Applications.framework

Rev

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

Rev 145 Rev 173
Line 12... Line 12...
12
* @package   Framework
12
* @package   Framework
13
* @author	aurelien <aurelien@tela-botanica.org>
13
* @author	aurelien <aurelien@tela-botanica.org>
14
* @copyright 2009 Tela-Botanica
14
* @copyright 2009 Tela-Botanica
15
* @license   http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
15
* @license   http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
16
* @license   http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
16
* @license   http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
17
* @version   SVN: $$Id: Modele.php 145 2010-03-02 17:23:09Z jpm $$
17
* @version   SVN: $$Id: Modele.php 173 2010-04-02 14:03:08Z aurelien $$
18
* @link	  /doc/framework/
18
* @link	  /doc/framework/
19
*
19
*
20
*/
20
*/
21
abstract class Modele {
21
abstract class Modele {
Line 176... Line 176...
176
		}
176
		}
Line 177... Line 177...
177
 
177
 
178
		$retour = null;
178
		$retour = null;
179
		switch ($this->abstraction) {
179
		switch ($this->abstraction) {
-
 
180
			case 'pdo':
180
			case 'pdo':
181
				try {
181
				$res_req = $this->connexion->query($requete);
182
					$res_req = $this->connexion->query($requete);
-
 
183
					$retour =$res_req->fetch($this->$mode);
-
 
184
				} catch (PDOException $e) {
-
 
185
					$message = 'RequĂȘte echec. Fichier : "%s". Ligne : "%s". Message : %s';
-
 
186
					trigger_error(sprintf($message, $e->getFile(), $e->getLine(), $e->getMessage()), E_USER_WARNING);
182
				$retour =$res_req->fetch($this->$mode);
187
				}
183
				break;
188
				break;
184
			case 'mysql':
189
			case 'mysql':
185
				$res = mysql_query($requete,$this->connexion);
190
				$res = mysql_query($requete,$this->connexion);
186
				$fonction_fetch = $this->$mode;
191
				$fonction_fetch = $this->$mode;