public function getSpeaker(): SpeakerInterface
    {
        foreach ($this->network->getSpeakers() as $speaker) {
            if ($speaker->getUuid() === $this->getRoom()) {
                return $speaker;
            }
        }

        throw new \RuntimeException("Unable to find a speaker for this alarm");
    }
public function getSpeaker(): SpeakerInterface
    {
        foreach ($this->network->getSpeakers() as $speaker) {
            if ($speaker->getUuid() === $this->getRoom()) {
                return $speaker;
            }
        }

        throw new \RuntimeException("Unable to find a speaker for this alarm");
    }
public function getSpeaker ( ) : SpeakerInterface { foreach ( $ this -> network -> getSpeakers ( ) as $ speaker ) { if ( $ speaker -> getUuid ( ) === $ this -> getRoom ( ) ) { return $ speaker ; } } throw new \ RuntimeException ( "Unable to find a speaker for this alarm" ) ; }
Get the speaker of the alarm.

@return SpeakerInterface
Get the speaker of the alarm .