aboutsummaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
authorMaZderMind2015-03-14 18:59:33 +0100
committerMaZderMind2015-03-29 21:38:59 +0200
commit97fe6bf0af2989abbaaba138df3c54c4e55af3c9 (patch)
tree203f677848b3ab2e5dd7c6f83097ca95aea6eaf4 /model
parenta95c081a74a59b5ba9ea6f036b792b62100b3b57 (diff)
Use normal Constructor
Diffstat (limited to '')
-rw-r--r--model/Overview.php2
-rw-r--r--model/Room.php7
2 files changed, 2 insertions, 7 deletions
diff --git a/model/Overview.php b/model/Overview.php
index 005233f..10507cc 100644
--- a/model/Overview.php
+++ b/model/Overview.php
@@ -12,7 +12,7 @@ class Overview
foreach($rooms as $room)
{
try {
- $groups[$group][] = Room::get($room);
+ $groups[$group][] = new Room($room);
}
catch(NotFountException $e)
{
diff --git a/model/Room.php b/model/Room.php
index 5799e96..fc1b40d 100644
--- a/model/Room.php
+++ b/model/Room.php
@@ -4,12 +4,7 @@ class Room
{
private $slug;
- public static function get($slug)
- {
- return new Room($slug);
- }
-
- private function __construct($slug)
+ public function __construct($slug)
{
if(! has('ROOMS.'.$slug))
throw new NotFoundException('Room '.$slug);