X-XSS-Protection

@link https://blogs.msdn.microsoft.com/ieinternals/2011/01/31/controlling-the-xss-filter
@param string $mode Mode value. Available Values: '1', '0', 'block'
@return $this
977106
public function setXssProtection($mode = self::XSS_BLOCK)
    {
        $mode = (string)$mode;

        if ($mode === self::XSS_BLOCK) {
            $mode = self::XSS_ENABLED_BLOCK;
        }

        $this->checkValues($mode, [self::XSS_ENABLED, self::XSS_DISABLED, self::XSS_ENABLED_BLOCK]);
        $this->headers['x-xss-protection'] = $mode;

        return $this;
    }
340239
protected function setMode($mode)
    {
        $mode = substr((string) $mode, 0, 2);
        if (!in_array($mode, $this->validModes, true)) {
            throw new \InvalidArgumentException("The given mode '$mode' is not valid for the requested operation");
        }
        $this->mode = $mode;

        return $this;
    }
910384
public function setXAxisDisplay($Mode, $Format = null)
    {
        $this->Data["XAxisDisplay"] = $Mode;
        $this->Data["XAxisFormat"] = $Format;
    }
1231107
public function transformMode($mode)
    {
        if (\array_key_exists($mode, $this->modes))
        {
            return $this->modes[$mode];
        }

        throw new \UnexpectedValueException("Mode {$mode} does not exist");
    }
354369
protected function loadTemplate(string $mode)
    {
        if ($mode == 'create') { // create mode
            $tplPath = sprintf(MODULE_VIEWS, $this->module . '/' . $this->division);
            $tplName = $tplPath . 'edit.php';
            $this->template->load($tplName);
        }
    }
992898
function enable_strict_mode($mode = true)
    {
        if (self::MAYBE == $this->language_data['STRICT_MODE_APPLIES']) {
            $this->strict_mode = ($mode) ? self::ALWAYS : self::NEVER;
        }
    }
744449
public function createDir($mode = 0777)
    {
        return is_dir($this->absoluteFileName) || mkdir($this->absoluteFileName, $mode, true);
    }
479813
private static function convertMode($mode)
    {
        if (is_string($mode)) {
            $mode = defined('\Tideways\Profiler::MODE_' . strtoupper($mode))
                ? constant('\Tideways\Profiler::MODE_' . strtoupper($mode))
                : self::MODE_DISABLED;
        } else if (!is_int($mode)) {
            $mode = self::MODE_DISABLED;
        } else if (($mode & (self::MODE_FULL|self::MODE_BASIC)) === 0) {
            $mode = self::MODE_DISABLED;
        }

        return $mode;
    }
1187990
public function set_mode($mode){
    if ( router::is_mode($mode) ){
      $this->mode = $mode;
    }
    return $this->mode;
  }
886574
public function setMode($mode)
    {
        Assertion::choice($mode, $this->availableModes, "Mode '{$mode}' does not exist.");
        $this->mode = $mode;

        return $this;
    }
1285016
public function chmod($mode, $flags = NULL) {
    $ret = chmod((string) $this,$mode);
    
    if ($ret === FALSE)
      throw new Exception('chmod für '.$this.' auf '.$mode.' nicht möglich');
      

    if ($flags & self::RECURSIVE) {
      foreach ($this->getContents() as $item) {
        if (is_object($item) && ($item instanceof File || $item instanceof Dir)) {
          $item->chmod($mode, $flags);
        }
      }
    }
    
    return $this;
  }
1098809
public function setGroupDisplayMode($mode)
    {
        if (!is_string($mode)) {
            throw new InvalidArgumentException(
                'Display mode must be a string'
            );
        }

        if ($mode === 'tabs') {
            $mode = 'tab';
        }

        $this->groupDisplayMode = $mode;

        return $this;
    }
540657
public function sanitize($value, $mode = null)
    {
        if ($mode === null) {
            $mode = $this->sanitize;
        }
        if (is_array($value)) {
            $hash = md5(json_encode($value));
            /* Optimize lazy loading */
            if (isset(static::$_sanitizeCache[$hash])) {
                return static::$_sanitizeCache[$hash];
            }

            return static::$_sanitizeCache[$hash] =
                ArrayHelper::map(
                    $value,
                    function ($value) use ($mode) {
                        return $this->sanitizeValue($value, $mode);
                    },
                    true
                );
        }

        return $this->sanitizeValue($value, $mode);
    }
882823
private function setMode(int $mode)
    {
        $this->mode = $mode;
        $this->modeStartLine = $this->line;
        $this->modeStartPosition = $this->getCurrentLinePosition();
    }
123173
public function setExtMode($mode)
	{
		if('image' === $mode || '$this' === $mode)
		{
			$this->allowExts=array('png','jpg','gif');
		}
		else if('video' === $mode)
		{
			$this->allowExts=array('mp4','avi','rmvb','rm','mpg','flv','mov','wmv','3gp','mkv');
		}
		else if('music' === $mode || 'audio' === $mode)
		{
			$this->allowExts=array('mp3','wma','aiff','au','midi','aac','ape');
		}
		else
		{
			return false;
		}
		return true;
	}
875887
public function flip($mode = self :: FLIP_HORIZONTAL) {
		
		if(false === in_array($mode, [self :: FLIP_HORIZONTAL, self :: FLIP_VERTICAL, self :: FLIP_BOTH])) {
			return trigger_error(sprintf('Unknown mode passed %s(), "%s" given', __METHOD__, gettype($mode)), E_USER_ERROR);
		}

		$this -> add(__FUNCTION__, func_get_args());
		return $this;
	}
87839
public function setMode($mode = self::MODE_WHITESPACE_ONLY)
    {
        if (!in_array($mode, $this->availableModes)) {
            throw new Exception\InvalidArgumentException(sprintf(
                'The mode "%s" is not available.',
                $mode
            ));
        }

        $this->mode = (string) $mode;

        return $this;
    }