Sets the insulated flag.

@param bool $insulated Whether to insulate the requests or not

@throws \RuntimeException When Symfony Process Component is not installed
438729
public function insulate($insulated = true)
    {
        if ($insulated && !class_exists('Symfony\\Component\\Process\\Process')) {
            throw new \RuntimeException('Unable to isolate requests as the Symfony Process Component is not installed.');
        }

        $this->insulated = (bool) $insulated;
    }
963997
public function setFlags($flags)
    {
        if ($flags !== null) {
            if (! in_array($flags, [State::SAVED, State::DELETED, State::DELETED | State::SAVED], true)) {
                $message = 'Flags were %s, but need to be State::SAVED, State::DELETED or State::DELETED | State::SAVED';
                throw new InvalidArgumentException(sprintf($message, $flags));
            }

            $this->flags = $flags;
        }

        return $this;
    }
1136369
public function setCompressor(CompressorInterface $compressor)
    {
        if (!$compressor->isSupported()) {
            throw new \RuntimeException('Unsupported type of compressor: ' . $compressor->getName());
        }

        $this->compressor = $compressor;

        return $this;
    }
1085285
public function setActiveOnly($flag = true)
    {
        $flag = (bool)$flag;
        if ($this->activeOnly !== $flag) {
            $this->clear();
            $this->activeOnly = $flag;
        }
        return $this;
    }
339019
public function setDispatched($flag)
    {
        $this->dispatched = $flag ? true : false;

        if ($flag) {
            $this->emitRequestDispatched($this);
        }
    }
1349517
protected function setFlag($flag, $enable = true)
    {
        if ($enable) {
            $this->flags[$flag] = true;
        } else {
            unset($this->flags[$flag]);
        }
    }
1192758
public function set($key, $value, $expiry = null)
	{
		// make sure we have a valid key
		if ($key === null)
		{
			throw new \RuntimeException('No valid key passed to setFlash()');
		}

		// get the default expiry if none is given
		$expiry === null and $expiry = $this->defaultExpiryState;

		// validate the expiry
		if ( ! in_array($expiry, $this->expiryStates))
		{
			throw new \RuntimeException('"'.$expiry.'" is not a valid session flash variable expiration state.');
		}

		// store the expiry information for this key
		$this->data[static::EXPIRE_DATA_KEY][$key] = array($expiry, static::EXPIRE_STATE_NEW);

		// and store the value passed
		parent::set($this->prefixKey($key), $value);
	}
597722
def setFlag(self, flag, state=True):
        
        has_flag = self.testFlag(flag)
        if has_flag and not state:
            self.setFlags(self.flags() ^ flag)
        elif not has_flag and state:
            self.setFlags(self.flags() | flag)
1215856
protected function setAlive($bool)
    {
        $executionId = $this->getExecution()->getId();
        $this->getEntityManager()->clear($this->getProcess());
        $this->getEntityManager()->clear($this->getExecution());
        $this->getEntityManager()->refresh($this->getProcess());
        $this->setExecution($this->getEntityManager()
            ->getRepository('Minibus\Model\Entity\Execution')
            ->find($executionId));
        if ($bool && $this->getProcess()->getInterrupted()) {
            $this->getEntityManager()->refresh($this->getExecution());
            $this->getProcess()->setRunning(false);
            $this->getProcess()->setAlive(false);
            $this->getExecution()->setState(Execution::STOPPED_STATE);
            $this->getProcess()->setInterrupted(false);
            throw new ProcessException("L'exécution " . $this->getExecution()->getId() . " a été interrompue ");
        }
        $this->getProcess()->setRunning($bool);
        $this->getProcess()->setAlive($bool);
        $this->getExecution()->setState($bool ? Execution::RUNNING_STATE : Execution::STOPPED_STATE);
        $this->getEntityManager()->flush($this->getProcess());
    }
1010684
public function setStatus($status, $envelope = null)
	{
		// Check if we're not in a final state yet
		if ($this->status > 0) {
			throw new \RuntimeException('Cannot change status from final state ' . $this->status . ' to state ' . $status . '.');
		}

		// Check if this is a valid state
		if ( !in_array($status, array_keys(self::$statusDescriptionMapping)) ) {
			throw new \InvalidArgumentException('Status ' . $status . ' is not a valid status.');
		}

		// Check if the retry envelope is not this envelope
		if ($this === $envelope) {
			throw new \InvalidArgumentException('Retry envelope cannot be set to this envelope.');
		}

		// Save it!
		$this->status = $status;
		$this->retryEnvelope = $envelope;
	}
809869
public function setSessionId(string $sessionId): void
    {
        if (empty($sessionId)) {
            throw new RuntimeException('CSRF middleware failed. SessionId not found!');
        }

        $this->sessionId = $sessionId;
    }
221890
public function setIsBold ( $isBold ) {
        if ( $isBold === true ) {
            $this->_isBold = true;
        } else {
            $this->_isBold = false;
        }
    }
1280546
public function setFlags($flags)
    {
        if (!is_int($flags)) {
            throw new InvalidArgumentException('integer', 0);
        }

        if (($flags & FORCE_USE_PROC_OPEN) && ($flags & FORCE_USE_EXEC)) {
            throw new DomainException("Invalid flags: FORCE_USE_PROC_OPEN and FORCE_USE_EXEC cannot be set at the same time");
        }

        $this->flags = $flags;

        return $this;
    }
375321
public function setBlocking($blocking)
    {
        if ($this->status != self::STATUS_NEW) {
            throw new \RuntimeException('Cannot set worker blocking after worker has started working');
        }

        $this->blocking = (bool)$blocking;
    }
598498
def setFlag(self, flag, state=True):
        
        if state:
            self.__flags |= flag
        else:
            self.__flags &= ~flag
1372210
final public static function SetSessionAutoStart( bool $autoStart ) : void {
        
        self::SetConfigFromSetter(
                $autoStart,
                self::akSessionAutoStart,
                self::ValidateSessionAutoStart( )
        );
        
    }
1149197
public function setFlags($flags) {
        if($flags !== $flags & (AMQP_DURABLE | AMQP_PASSIVE | AMQP_EXCLUSIVE | AMQP_AUTODELETE))
            return false;

        $this->flags = $flags;
        return true;
    }