public function getControllerByRoom(string $room): ControllerInterface
    {
        $group = $this->getSpeakerByRoom($room)->getGroup();

        $controllers = $this->getControllers();
        foreach ($controllers as $controller) {
            if ($controller->getGroup() === $group) {
                return $controller;
            }
        }

        throw new NotFoundException("Unable to find the controller for the room '{$room}'");
    }
public function getControllerByRoom(string $room): ControllerInterface
    {
        $group = $this->getSpeakerByRoom($room)->getGroup();

        $controllers = $this->getControllers();
        foreach ($controllers as $controller) {
            if ($controller->getGroup() === $group) {
                return $controller;
            }
        }

        throw new NotFoundException("Unable to find the controller for the room '{$room}'");
    }
public function getControllerByRoom ( string $ room ) : ControllerInterface { $ group = $ this -> getSpeakerByRoom ( $ room ) -> getGroup ( ) ; $ controllers = $ this -> getControllers ( ) ; foreach ( $ controllers as $ controller ) { if ( $ controller -> getGroup ( ) === $ group ) { return $ controller ; } } throw new NotFoundException ( "Unable to find the controller for the room '{$room}'" ) ; }
Get the coordinator for the specified room name.

@param string $room The name of the room to look for

@return ControllerInterface
Get the coordinator for the specified room name .