duncan3dc\Sonos\Controller::addSpeaker PHP Method

addSpeaker() public method

Adds the specified speaker to the group of this Controller.
public addSpeaker ( duncan3dc\Sonos\Speaker $speaker ) : static
$speaker duncan3dc\Sonos\Speaker The speaker to add to the group
return static
    public function addSpeaker(Speaker $speaker)
    {
        if ($speaker->getUuid() === $this->getUuid()) {
            return $this;
        }
        $speaker->soap("AVTransport", "SetAVTransportURI", ["CurrentURI" => "x-rincon:" . $this->getUuid(), "CurrentURIMetaData" => ""]);
        $this->network->clearTopology();
        return $this;
    }