Overrides the autoescape setting

@param bool $state
@deprecated 1.5 Auto-escape should always be turned on to protect against XSS issues (can be disabled per template file).
330789
public function setAutoescape($state)
    {
        if (!$state) {
            user_error(__CLASS__ . '::' . __FUNCTION__ . '(false) is deprecated since Grav 1.5', E_USER_DEPRECATED);
        }

        $this->autoescape = (bool) $state;
    }
438493
public static function set_StockState( $state )
    {
        if( $state instanceof StockState or null === $state ) {
            $state = StockState::makeFromString( $state );
        }
        return $state;
    }
752960
public function setRecordState($state)
    {
        if ($state != null) {
            $this->flush();
            $this->record = StringHelper::booleanValue($state);
        }
    }
372637
private function setStates(array $states)
    {
        foreach ($states as $state) {
            if (!is_string($state) || strlen($state) !== 1) {
                throw new \InvalidArgumentException(
                    'State must be a one character string'
                );
            }
        }

        $this->states = $states;
    }
343063
void changeState(State state) {

        m_state = state;
        switch (state) {
            case validationRunning:
                m_cancelButton.setEnabled(false);
                m_okButton.setEnabled(false);
                clearValidationError();
                break;
            case validationFailed:
                m_okButton.setEnabled(false);
                m_cancelButton.setEnabled(true);
                break;
            case validationUnknown:
            default:
                m_cancelButton.setEnabled(true);
                m_okButton.setEnabled(true);
                clearValidationError();
                break;

        }
    }
671368
function setAuthenticated($state)
        {
            if($state == false)
            {
                $this->container->get('session')->remove('autenticated');
                if($this->container->get('session')->has('identity'))
                {
                    $this->container->get('session')->remove('identity');
                }

            }
            else
            {
                $this->container->get('session')->set('autenticated',true);
            }
        }
1038823
protected function getState($state = null)
	{
		if(null === $state)
		{
			if(null === $this->state)
			{
				$this->state = md5(\uniqid('', true));
			}
		}
		else
		{
			$this->state = $state;
		}
		return $this->state;
	}
904593
function renderingTitle($state = null) {
		if (!is_null($state)) {
			$this->_renderingTitle = $state;
		}
		return $this->_renderingTitle;
	}
651518
public function set_overridden($state, $refresh = true) {
        if (empty($this->overridden) and $state) {
            $this->overridden = time();
            $this->update();
            return true;

        } else if (!empty($this->overridden) and !$state) {
            $this->overridden = 0;
            $this->update();

            if ($refresh) {
                //refresh when unlocking
                $this->grade_item->refresh_grades($this->userid);
            }

            return true;
        }
        return false;
    }
1087120
public function setState($state)
    {
        if (!empty($state) && is_string($state) && ctype_print($state)) {
            $this->state = trim($state);
        }

        return $this;
    }
1029867
public function setSelected( $state ) {
		$this->selected = (bool)$state;
		if ( $this->selected ) {
			$this->input->setAttributes( [ 'checked' => 'checked' ] );
		} else {
			$this->input->removeAttributes( [ 'checked' ] );
		}
		return $this;
	}
794040
public function setState($state)
    {
        $oldState = $this->getState()->getUri();
        if ($oldState == $state) {
            common_Logger::w('Delivery execution ' . $this->getIdentifier() . ' already in state ' . $state);
            return false;
        }
        $this->setData(OntologyDeliveryExecution::PROPERTY_STATUS, $state);
        if ($state == DeliveryExecutionInterface::STATE_FINISHED) {
            $this->setData(OntologyDeliveryExecution::PROPERTY_TIME_END, microtime());
        }
        return $this->service->updateDeliveryExecutionStatus($this, $oldState, $state);
    }
221348
def _toggle_autoescape(context, escape_on=True):
    '''
    
    '''
    previous = is_autoescape(context)
    setattr(context.caller_stack, AUTOESCAPE_KEY, escape_on)
    try:
        context['caller'].body()
    finally:
        setattr(context.caller_stack, AUTOESCAPE_KEY, previous)
182508
protected function _sanitize($state)
    {
        //Treat empty string as null
        if ($state->value === '') {
            $state->value = null;
        }

        //Only filter if we have a value
        if(!empty($state->value))
        {
            //Only accepts scalar values and array
            if(!is_scalar($state->value) && !is_array($state->value))
            {
                throw new \UnexpectedValueException(
                    'Value needs to be an array or a scalar, "'.gettype($state->value).'" given'
                );
            }

            $filter = $state->filter;

            if(!($filter instanceof FilterInterface)) {
                $filter =  $this->getObject('filter.factory')->createChain($filter);
            }

            $state->value = $filter->sanitize($state->value);
        }

        return $state;
    }
1265153
public function setState($state)
    {
        $this->complement['state'] = $state;
        $this->states['state'] = $state;
        $this->setStates();

        return $state;
    }
1122264
public function setState($state)
		{
		$r = array_pop($this->states);
		array_push($this->states, $state);
		$this->state = $this->states[count($this->states) - 1];
		return $r;
		}
868180
protected function _setState($state)
    {
        if ($state !== null && !($state instanceof MapInterface)) {
            throw $this->_createInvalidArgumentException(
                $this->__('Argument is not a valid map'), null, null, $state
            );
        }

        $this->state = $state;
    }