From a24c029248cd8db3d1eb7ace83b7df5c835a2b64 Mon Sep 17 00:00:00 2001 From: MaZderMind Date: Tue, 31 Mar 2015 06:59:45 +0200 Subject: Static Room-List getter --- model/Room.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'model/Room.php') diff --git a/model/Room.php b/model/Room.php index cac01cc..12c8881 100644 --- a/model/Room.php +++ b/model/Room.php @@ -25,6 +25,15 @@ class Room extends ModelBase return null; } + public static function rooms() + { + $rooms = array(); + foreach(ModelBase::get('ROOMS') as $slug => $room) + $rooms[] = new Room($slug); + + return $rooms; + } + public function getSlug() { return $this->slug; -- cgit v1.2.3