duncan3dc\Sonos\Controller::setState PHP Method

setState() public method

Set the state of the group.
public setState ( integer $state ) : static
$state integer One of the class STATE_ constants
return static
    public function setState($state)
    {
        switch ($state) {
            case self::STATE_PLAYING:
                return $this->play();
            case self::STATE_PAUSED:
                return $this->pause();
            case self::STATE_STOPPED:
                return $this->pause();
        }
        throw new \InvalidArgumentException("Unknown state: {$state})");
    }