Beispiel #1
0
 /**
  * @param $id
  * @return Queue
  */
 public function fetchQueueByRoom(Room $room)
 {
     if (!$this->isQueueCached($room->getQueueId())) {
         $this->queues[$room->getQueueId()] = $this->_dataMapper->fetchQueueByRoom($room);
     }
     return $this->queues[$room->getQueueId()];
 }
 /**
  * @param Room
  * @return Room
  */
 public function createRoom(Room $room)
 {
     $statement = $this->_dbCon->query('INSERT INTO `room` (?,?,?,?,?)', array(null, $room->getQueueId(), $room->getTitle(), $room->getPassword(), $room->getUserLimit()));
     $driver = $this->_dbCon->getDriver();
     $room->setId($driver->getLastGeneratedValue());
     return $room;
 }