duncan3dc\Sonos\Controller::setPlayMode PHP Method

setPlayMode() protected method

Set a particular PlayMode.
protected setPlayMode ( string $type, boolean $value ) : static
$type string The play mode attribute to update
$value boolean The value to set the attribute to
return static
    protected function setPlayMode($type, $value)
    {
        $value = (bool) $value;
        $mode = $this->getMode();
        if ($mode[$type] === $value) {
            return $this;
        }
        $mode[$type] = $value;
        $this->setMode($mode);
        return $this;
    }