public function setState(int $state): ControllerInterface
    {
        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})");
    }
public function setState(int $state): ControllerInterface
    {
        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})");
    }
public function setState ( int $ state ) : ControllerInterface { 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})" ) ; }
Set the state of the group.

@param int $state One of the class STATE_ constants

@return $this
Set the state of the group .