Sets the gstate

@param $gstate_options
@return int
972035
public function _set_gstate($gstate_options)
    {
        if (($gstate = array_search($gstate_options, $this->_gstates)) === false) {
            $gstate = $this->_pdf->create_gstate($gstate_options);
            $this->_gstates[$gstate] = $gstate_options;
        }

        return $this->_pdf->set_gstate($gstate);
    }
530146
public function set_option($options = array()) {
        $options['issuerid'] = clean_param($options['issuerid'], PARAM_INT);
        $options['controlledlinkfoldername'] = clean_param($options['controlledlinkfoldername'], PARAM_TEXT);

        $ret = parent::set_option($options);
        return $ret;
    }
1355519
public function setOptions($options)
    {
        // Valid Options
        $validOptions = ['delete', 'update', 'constraint'];
        foreach ($options as $option => $value) {
            if (!in_array($option, $validOptions, true)) {
                throw new \RuntimeException(sprintf('"%s" is not a valid foreign key option.', $option));
            }

            // handle $options['delete'] as $options['update']
            if ('delete' === $option) {
                $this->setOnDelete($value);
            } elseif ('update' === $option) {
                $this->setOnUpdate($value);
            } else {
                $method = 'set' . ucfirst($option);
                $this->$method($value);
            }
        }

        return $this;
    }
266412
public function setOptions(array $options)
    {
        $validOptions = array_flip(
            array(
            'cache_limiter', 'cookie_domain', 'cookie_httponly',
            'cookie_lifetime', 'cookie_path', 'cookie_secure',
            'entropy_file', 'entropy_length', 'gc_divisor',
            'gc_maxlifetime', 'gc_probability', 'hash_bits_per_character',
            'hash_function', 'name', 'referer_check',
            'serialize_handler', 'use_strict_mode', 'use_cookies',
            'use_only_cookies', 'use_trans_sid', 'upload_progress.enabled',
            'upload_progress.cleanup', 'upload_progress.prefix', 'upload_progress.name',
            'upload_progress.freq', 'upload_progress.min-freq', 'url_rewriter.tags',
            )
        );

        foreach ($options as $key => $value) {
            if (isset($validOptions[$key])) {
                ini_set('session.'.$key, $value);
            }
        }
    }
585527
protected function setState($state)
    {
        $serviceService = $this->getServiceLocator()->get(StateStorage::SERVICE_ID);
        $userUri = $this->getSession()->getUserUri();
        return is_null($userUri) ? false : $serviceService->set($userUri, $this->getServiceCallId(), $state);
    }
331209
public function setState($state)
    {
        $state &= ~248; // 0b11111000

        if (($state & ($state - 1)) !== 0) {
            throw new InvalidArgumentException("State must be a valid state value");
        }

        $this->setFlags($state);
        $this->streamCallback = null;
    }
630857
protected function setOptions(array $options)
	{
		// Set name
		if (isset($options['name']))
		{
			session_name(md5($options['name']));
		}

		// Set id
		if (isset($options['id']))
		{
			session_id($options['id']);
		}

		// Set expire time
		if (isset($options['expire']))
		{
			$this->setExpire($options['expire']);
		}

		// Get security options
		if (isset($options['security']))
		{
			$this->security = explode(',', $options['security']);
		}

		if (isset($options['force_ssl']))
		{
			$this->force_ssl = (bool) $options['force_ssl'];
		}

		if (isset($options['cookie_domain']))
		{
			$this->cookie_domain = $options['cookie_domain'];
		}

		if (isset($options['cookie_path']))
		{
			$this->cookie_path = $options['cookie_path'];
		}

		// Sync the session maxlifetime
		if (!headers_sent())
		{
			ini_set('session.gc_maxlifetime', $this->getExpire());
		}

		return true;
	}
1195659
public function setOptions($options = [])
    {
        $this->options = $options;
        $this->debug->info(__FUNCTION__, 'setOptions: ', $this->options);

        return $this;
    }
189810
public function setGS1($gs1) {
        $gs1 = (int)$gs1;
        if ($gs1 !== self::GS1_AUTO && $gs1 !== self::GS1_PREFIX978 && $gs1 !== self::GS1_PREFIX979) {
            throw new CINArgumentException('The GS1 argument must be CINisbn::GS1_AUTO, CINisbn::GS1_PREFIX978, or CINisbn::GS1_PREFIX979', 'gs1');
        }

        $this->gs1 = $gs1;
    }
118527
function setStatusCode($status)
    {
        if (! is_numeric($status)
            || is_float($status)
            || $status < 100
            || $status >= 600
        )
            throw new \InvalidArgumentException(sprintf(
                'Invalid status code "%s"; must be an integer between 100 and 599, inclusive',
                (is_scalar($status) ? $status : gettype($status))
            ));

        $this->statCode = $status;
        return $this;
    }
1285948
public function setOptions(array $options = [], $reset = false)
    {
        return $this->setDigits(current($options) ? (int) current($options) : 2)
                ->setSeparator(next($options) ? current($options) : ',')
                ->setThousands(next($options) ? current($options) : ' ')
                ->setTrimZeros(next($options) ? (bool) current($options) : false)
                ->setTrimLeaveZeros(next($options) ? current($options) : 2);
    }
1178931
protected function setState($state)
    {
        if (!array_key_exists($state, $this->stateDirectives)) {
            throw new InvalidArgumentException("Invalid state {$state}");
        }
        $this->state = $state;
        return $this;
    }
988688
protected final synchronized void setState(int newState)
    {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && // d527372
            TEBeanLifeCycleInfo.isTraceEnabled())
            TEBeanLifeCycleInfo.traceBeanState(state, getStateName(state), newState,
                                               getStateName(newState)); // d167264

        state = newState;
    }
1039098
public function incTry(IState &$state = null): int
    {
        $count = (int) $state->getAdditional(static::STATE__CURRENT_TRIES_COUNT);
        $count++;
        $state->setAdditional(static::STATE__CURRENT_TRIES_COUNT, $count);

        return $count;
    }
1027077
protected function setOptions(array $options)
    {
        $this->options = array_merge(
            array_map(
                function ($value) {
                    return $value[0];
                },
                $this->supportedOptions
            ),
            $options
        );
    }
1310776
public function setState($state)
    {
        if (!is_numeric($state)) {
            $errMsg = sprintf('Аргумент должен быть числом. Актуальное значение %s', $state);
            throw new ArgumentNotNumericException($errMsg);
        }
        $this->state = (integer)$state;

        return $this;
    }
947738
public function setState($state)
    {
        $oldState = $this->getState();

        if ($oldState === $state) {
            return $this;
        }

        $this->getLogger()->debug('Changing state from: '.$oldState.' to: '.$state.'.');
        $this->state = $state;

        return $this;
    }