diff options
author | MaZderMind | 2015-03-31 06:59:45 +0200 |
---|---|---|
committer | MaZderMind | 2015-03-31 06:59:45 +0200 |
commit | a24c029248cd8db3d1eb7ace83b7df5c835a2b64 (patch) | |
tree | 4f613f9b06dcff6fe766f84ef46fe5cfd9aca32e /model/Room.php | |
parent | e6b64e9ef4ba03ee9cf8ea0dbf575c6979c79a45 (diff) |
Static Room-List getter
Diffstat (limited to '')
-rw-r--r-- | model/Room.php | 9 |
1 files changed, 9 insertions, 0 deletions
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; |