Set if TLS should be used for the connection.

@param bool $isEnabled
@return static
@throws InvalidArgumentException
961261
public function setTLS($isEnabled)
    {
        if (!is_bool($isEnabled)) {
            throw new InvalidArgumentException(
                sprintf('%s only accepts a boolean', __FUNCTION__)
            );
        }

        $this->tls = (bool)$isEnabled;

        return $this;
    }
74339
function setBuddyNotification($player, $enable, $multicall = false)
    {
        $login = $this->getLogin($player, true);
        if ($login === false) {
            throw new InvalidArgumentException('player = ' . print_r($player, true));
        }
        if (!is_bool($enable)) {
            throw new InvalidArgumentException('enable = ' . print_r($enable, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array($login, $enable), $multicall);
    }
597073
function setProtocol($protocol)
    {
        $protocol = (string) $protocol;
        $protocol = strtolower($protocol);
        
        if ($protocol !== 'http' && $protocol !== 'https')
            throw new \InvalidArgumentException(sprintf(
                'Protocol (%s) not supported; using "http" or "https".'
                , $protocol
            ));
        
        $this->protocol = $protocol;
        return $this;
    }
1000126
public function setStatus($status)
	{
		$status = (int)$status;

		if($status < 100)
		{
			throw new \InvalidArgumentException(sprintf('Invalid HTTP status code: %u', $status));
		}
		
		if($status >= 600)
		{
			throw new \InvalidArgumentException(sprintf('Invalid HTTP status code: %u', $status));
		}
		
		$this->status = $status;
		
		return $this;
	}
1043224
public function setHasFixtures($hasFixtures)
    {
        if (!is_bool($hasFixtures)) {
            throw new \InvalidArgumentException('The attribute hasFixtures on the class Entity has to be boolean (' . gettype($hasFixtures) . ('object' === gettype($hasFixtures) ? ' ' . get_class($hasFixtures) : '') . ' given).');
        }

        $this->hasFixtures = $hasFixtures;

        return $this;
    }
1232061
public function isEnable($enable = null)
    {
        if ($enable !== null) {
            $this->enable = (bool) $enable;
        }

        return $this->enable;
    }
1347282
public function isEnabled($bool = null)
    {
        if ($bool === true || $bool === false) {
            $this->isEnabled = $bool;
        }

        return $this->isEnabled;
    }
225067
final public function autoconfigure(bool $autoconfigured = true)
    {
        if ($autoconfigured && $this->definition instanceof ChildDefinition) {
            throw new InvalidArgumentException(sprintf('The service "%s" cannot have a "parent" and also have "autoconfigure". Try disabling autoconfiguration for the service.', $this->id));
        }
        $this->definition->setAutoconfigured($autoconfigured);

        return $this;
    }
1224295
public function enable($enable = true)
    {
        if (! is_bool($enable)) {
            throw new InvalidArgumentException("enable must be a boolean. [$enable] given.");
        }

        $this->enabled = $enable;

        return $this;
    }
1023489
public function setAccessLevel($access_level)
  {
    $allowedValues = $this->getAccessLevelAllowableValues();
    if (!is_null($access_level) && !in_array($access_level, $allowedValues)) {
      throw new \InvalidArgumentException(
        sprintf(
          "Invalid value for 'access_level', must be one of '%s'",
          implode("', '", $allowedValues)
        )
      );
    }
    $this->container['access_level'] = $access_level;

    return $this;
  }
1282043
public function setConnectTimeout($connectTimeout) {
        $this->connectTimeout = (float) $connectTimeout;
        if ($this->connectTimeout < 0) {
            throw new InvalidArgumentException('connect timeout < 0');
        }
        return $this;
    }
1253455
public function setStatus($status)
    {
        if (!in_array($status, $this->statusList)) {
            throw new \InvalidArgumentException(sprintf('Invalid status for %s.', __CLASS__));
        }
        $this->status = $status;

        return $this;
    }
1049336
public function setStatus($status)
    {
        if (!in_array($status, static::getAvailableStatuses(), true)) {
            throw new InvalidArgumentException(sprintf('Status not recognized ; Had "%s", expected one of "%s"', $status, implode('", "', static::getAvailableStatuses())));
        }

        $this->status = $status;

        return $this;
    }
142804
public static function EnableSSL () {
		return static::LasyClassVarConstAccessCallback('enable_ssl', function () {
			return (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https') || (isset($_SERVER['HTTPS']) && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off');
		});
	}
355159
public function redirect($redirectStatus = 302)
    {
        if (!in_array($redirectStatus, [false, 301, 302], true)) {
            throw new InvalidArgumentException('The redirect status code must be 301, 302 or false');
        }

        $this->redirectStatus = $redirectStatus;

        return $this;
    }
478732
public function enabled($enabled = true)
    {
        if (is_bool($enabled)) {
            return $this->andWhere(['enabled' => $enabled == true ? 1 : 0]);
        }
        return $this;
    }
897239
public function setAllowed(array $allowed){
        $this->allowed  = array_unique(
            array_map(
                "strtoupper",
                array_filter(
                    $allowed,
                    "is_string"
                )
            )
        );

        if(empty($this->allowed)){
            $this->allowed  = null;
        }

        return $this;
    }