Set whether or not the continuous play (subject to maxPlays) of the media is in force.

@param boolean $loop
@throws \InvalidArgumentException If $loop is not a boolean value.
341696
public function setLoop($loop)
    {
        if (is_bool($loop) === true) {
            $this->loop = $loop;
        } else {
            $msg = "The 'loop' argument must be a boolean value, '" . gettype($loop) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
1199770
public function setReplayGain($replayGain)
	{
		$values = [self::REPLAY_GAIN_DROP, self::REPLAY_GAIN_IGNORE, self::REPLAY_GAIN_TRACK, self::REPLAY_GAIN_ALBUM];
		
		if ( ! is_scalar($replayGain) || ! in_array($replayGain, $values, false))
		{
			throw new \InvalidArgumentException(sprintf('Wrong replayGain value for %s, available values are %s',
				(string) $replayGain, implode(', ', $values)));
		}
		
		$this->replayGain = (string) $replayGain;
		
		return $this;
	}
1010664
public final function setFetchObject(string $fetchObject): void
    {
        if (!class_exists($fetchObject)) {
            throw new InvalidValueException("Fetch object class '{$fetchObject}' not found!");
        }

        $this->fetchObject = $fetchObject;
    }
1175986
public function setShuffle($shuffle)
    {
        if (is_bool($shuffle)) {
            $this->shuffle = $shuffle;
        } else {
            $msg = "Shuffle must be a boolean, '" . gettype($shuffle) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
480651
public static function reset($object)
	{
		if (!($object instanceof CodeGeneratorRequest)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\Compiler\CodeGeneratorRequest.');
		}
		$object->fileToGenerate = NULL;
		$object->parameter = NULL;
		$object->protoFile = NULL;
	}
714875
public function setByValueOperator($operator = 'OR')
    {
        if ($operator != 'AND' && $operator != 'OR') {
            throw new \InvalidArgumentException('not allowed operator: "'.$operator.'" (AND / OR is allowed)');
        }

        $this->byValueOperator = (string) $operator;
    }
600142
public function setMedia($media)
    {
        if (is_string($media)) {
            $this->media = $media;
        } else {
            $msg = "Media must be a string, '" . gettype($media) . "' given.";
            throw new InvalidArgumentException($msg);
        }
    }
972023
function setMaxPlayers($maxPlayers, $multicall = false)
    {
        if (!is_int($maxPlayers)) {
            throw new InvalidArgumentException('maxPlayers = ' . print_r($maxPlayers, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array($maxPlayers), $multicall);
    }
135759
public function setValue($value)
    {
        if ((\is_bool($value))) {
            $this->value = (bool) $value;
        } elseif (\is_object($value) && $value instanceof self) {
            $this->value = $value->getValue();
        } else {
            throw new \InvalidArgumentException('Expected boolean');
        }
    }
68614
public function setMax($max)
    {
        $max = (int) $max;

        if ($max < 0) {
            throw new \InvalidArgumentException('Error: Maximum cannot be smaller than zero');
        }
        if ($max < $this->min) {
            // We do not throw an exception but silently adjust the minimum.
            $this->min = $max;
        }

        $this->max = $max;
    }
1007359
public function setVideoBitrate($bitrate)
	{
		if ( ! is_numeric($bitrate) || $bitrate < 0)
		{
			throw new \InvalidArgumentException('The video bit rate value must be a integer type.');
		}
		
		$this->videoBitrate = (int) $bitrate;
		
		return $this;
	}
755790
protected function setQueryCount(string $query)
    {
        if ('' === $query) {
            throw new \InvalidArgumentException('setQueryCount require a valid string argument');
        }
        $this->queryCount = $query;
        $this->countMethod = self::COUNT_METHOD_QUERY;
    }
892772
void playAsMusic(int buffer,float pitch,float gain, boolean loop) {
		paused = false;
		
		setMOD(null);
		
		if (soundWorks) {
			if (currentMusic != -1) {
				AL10.alSourceStop(sources.get(0));
			}
			
			getMusicSource();
			
			AL10.alSourcei(sources.get(0), AL10.AL_BUFFER, buffer);
			AL10.alSourcef(sources.get(0), AL10.AL_PITCH, pitch);
		    AL10.alSourcei(sources.get(0), AL10.AL_LOOPING, loop ? AL10.AL_TRUE : AL10.AL_FALSE);
			
			currentMusic = sources.get(0);
			
			if (!music) {
				pauseLoop();
			} else {
				AL10.alSourcePlay(sources.get(0)); 
			}
		}
	}
706067
protected static function setSampled($sampler)
    {
        if ($sampler === null) {
            static::$sampled = true;
            return null;
        }

        if (is_bool($sampler)) {
            static::$sampled = $sampler;
            return null;
        }

        if (!is_bool($sampler) && !($sampler instanceof Sampler)) {
            throw new \InvalidArgumentException('$sampler must be instance of Sampler or boolean');
        }

        static::$sampled = $sampler->isSampled();
        return null;
    }
506616
private function setRealBoolean(string $val):bool
    {
        if ($val === "true") {
            $val = true;
        } else {
            $val = false;
        }
        return ($val);
    }
418471
public function setNextQueryIsolationLevel(string $level) : void
    {
        if (!\in_array($level, static::ISOLATION_LEVELS, true)) {
            throw new InvalidIsolationLevelException();
        }

        $this->nextQueryIsolationLevel = $level;
    }
44226
public function setParamVariable($paramVariable)
    {
        if (is_bool($paramVariable) === true) {
            $this->paramVariable = $paramVariable;
        } else {
            $msg = "The 'paramVariable' argument must be a boolean value, '" . gettype($paramVariable) . "'.";
            throw new InvalidArgumentException($msg);
        }
    }