diviner.menu.class.php 1 KB
Newer Older
David's avatar
David committed
1
	<?php
maryam's avatar
done  
maryam committed
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

class diviner_menu
{
	private $mode = '';

	public function set_mode($mode)
	{
		$this->mode = $mode;
	
	}

	public function process()
	{
	
// Traitement des modes
	switch ( $this->mode )
		{
		case 'diviner.timeout':
			include('controllers/diviner.timeout.class.php');
			$controller = new diviner_timeout();
			$controller->set_mode($this->mode);
			return $controller->process();
		break;
		case 'diviner.result':
			include('controllers/diviner.result.class.php');
			$controller = new diviner_result();
			$controller->set_mode($this->mode);
			return $controller->process();
		break;
David's avatar
David committed
31
		case 'diviner.game':
maryam's avatar
done  
maryam committed
32
33
34
35
				include('controllers/diviner.class.php');
				$controller = new diviner_game();
				$controller->set_mode($this->mode);
				return $controller->process();
David's avatar
David committed
36
37
38
39
40
41
		break;
		default:
				include('controllers/diviner.menu.game.php');
				$controller = new diviner_menu_game();
				$controller->set_mode($this->mode);
				return $controller->process();
maryam's avatar
done  
maryam committed
42
43
44
45
46
		}
	}
}

?>