diff options
| author | MaZderMind | 2015-03-15 19:13:25 +0100 | 
|---|---|---|
| committer | MaZderMind | 2015-03-29 21:42:01 +0200 | 
| commit | ea4b6c7699a7fbb7be3d9e5ce86c84a36b63f569 (patch) | |
| tree | c919029a8b12e43c363b898a1ff9f7adf5c3312b /model/Room.php | |
| parent | 97fe6bf0af2989abbaaba138df3c54c4e55af3c9 (diff) | |
Move get/set-Calls into ModelBase and abstract all access into a Model
Conflicts:
	model/Overview.php
	model/Room.php
	model/StreamList.php
	tests/ModelTestbase.php
Diffstat (limited to 'model/Room.php')
| -rw-r--r-- | model/Room.php | 10 | 
1 files changed, 5 insertions, 5 deletions
diff --git a/model/Room.php b/model/Room.php index fc1b40d..c7e51f9 100644 --- a/model/Room.php +++ b/model/Room.php @@ -1,12 +1,12 @@  <?php -class Room +class Room extends ModelBase  {  	private $slug;  	public function __construct($slug)  	{ -		if(! has('ROOMS.'.$slug)) +		if(! $this->has('ROOMS.'.$slug))  			throw new NotFoundException('Room '.$slug);  		$this->slug = $slug; @@ -26,11 +26,11 @@ class Room  	}  	public function getStream() { -		return get('ROOMS.'.$this->getSlug().'.STREAM', $this->getSlug()); +		return $this->get('ROOMS.'.$this->getSlug().'.STREAM', $this->getSlug());  	}  	public function getDisplay() { -		return get('ROOMS.'.$this->getSlug().'.DISPLAY', $this->getSlug()); +		return $this->get('ROOMS.'.$this->getSlug().'.DISPLAY', $this->getSlug());  	} @@ -40,6 +40,6 @@ class Room  	}  	public function hasSchedule() { -		return get('ROOMS.'.$this->getSlug().'.SCHEDULE') && has('SCHEDULE'); +		return $this->get('ROOMS.'.$this->getSlug().'.SCHEDULE') && $this->has('SCHEDULE');  	}  }  | 
