aboutsummaryrefslogtreecommitdiff
path: root/class/class.app.php
blob: 4078c179849ec2e26adf29d44f2ba2dcbdfa95d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
class App
{
	protected $bdd;

	public function __construct($config)
	{
		$host = $config['host'];
		$dbname = $config['dbname'];
		$user = $config['user'];
		$password = $config['password'];
		try {
			$this->bdd = new PDO('mysql:host=' . $host . ';dbname=' . $dbname . ';charset=utf8', $user, $password);
		} catch (Exeption $e) {
			die('Erreur : ' . $e->getMessage());
		}
	}

	public function getBdd()
	{
		return $this->bdd;
	}

	public function createfrombdd($id, $bdd)
	{

	}

}
?>