aboutsummaryrefslogtreecommitdiff
path: root/model/Overview.php
blob: 8a467bc0132f5b0406700d9b598024d8a95c6d36 (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
31
32
33
34
<?php

class Overview
{
	public function __construct(Conference $conference)
	{
		$this->conference = $conference;
	}

	public function getConference() {
		return $this->conference;
	}

	public function getGroups() {
		$groups = array();

		foreach($this->getConference()->get('OVERVIEW.GROUPS') as $group => $rooms)
		{
			foreach($rooms as $room)
			{
				try {
					$groups[$group][] = $this->getConference()->getRoom($room);
				}
				catch(NotFoundException $e)
				{
					// just ignore unknown rooms
					continue;
				}
			}
		}

		return $groups;
	}
}