Set output buffering mode.

One of: false, 'prepend' or 'append'

@param bool|string $mode

@throws InvalidArgumentException If an unknown buffering mode is specified
543067
public function setOutputBuffering($mode)
    {
        if (!in_array($mode, [false, 'prepend', 'append'], true)) {
            throw new InvalidArgumentException('Unknown output buffering mode');
        }
        $this->outputBuffering = $mode;
    }
987649
public static function validate(string $mode)
    {
        if (!self::isValid($mode)) {
            throw InvalidArgumentException::format(
                    'Invalid foreign key mode: expecting one of (%s), %s given',
                    Debug::formatValues(self::$modes), $mode
            );
        }
    }
893798
protected function set_mode(string $mode):void{
		$mode = strtolower($mode);

		if(!in_array($mode, ['totp', 'hotp'], true)){
			throw new AuthenticatorException('Invalid mode: '.$mode);
		}

		$this->mode = $mode;
	}
856824
public function setMode($mode)
    {
        if (($mode != 'compress') && ($mode != 'deflate')) {
            throw new Exception\InvalidArgumentException('Given compression mode not supported');
        }

        $this->options['mode'] = $mode;
        return $this;
    }
480464
public static function setDefaultMode(int $mode) : void
    {
        if (in_array($mode, [self::MODE_REGEX, self::MODE_STRING])) {
            self::$mode = $mode;
            return;
        }

        // Unknown mode
        throw new \UnexpectedValueException('Invalid route mode');
    }
74430
public static function write($fileName, $data, $mode = 'w')
    {
        if ($mode != 'w' && $mode != 'w+') {
            throw new \InvalidArgumentException('mode "'.$mode.'" is not valid');
        }
        if (!file_exists($fileName)) {
            if (!is_writable(dirname($fileName))) {
                throw new RuntimeException($fileName.' not writable');
            }
        } else {
            if (!is_writable($fileName)) {
                throw new RuntimeException($fileName.' not writable');
            }
        }

        $handler = fopen($fileName, $mode);
        fwrite($handler, (string) $data);
        fclose($handler);
    }
579139
public function setMethod($method)
    {
      if(!is_string($method) && strlen(trim($method)) == 0)
        throw new InvalidArgumentException(__METHOD__ . '; Invalid method, must be a non empty string');

      $this->method = $method;
    }
1160184
public function setSectionsMode($mode) {
		if (! in_array($mode, [
			self::SECTIONS_LOCALE,
			self::SECTIONS_DOMAIN,
			self::SECTIONS_IGNORE
		], true)) {
			throw new InvalidParameter('Unknown mode of sections treatment: "' . $mode . '"');
		}
		
		$this->sectionsMode = $mode;
		
		return $this;
	}
1215234
private function parse_mode( &$mode, $buffer )
	{
		if ( substr( trim( $buffer ), 0, 6 ) === '# --->' )
		{
			$mode = trim( substr( $buffer, 6 ) );
		}
	}
1046788
public static function load($mode)
    {
		if (!is_string($mode)){
			throw new InvalidArgumentException('Try to load an irregular mode in the context. The mode must be a string, ' . gettype($mode) . ' given.');
		}
    	else if (empty($mode)){
    		throw new InvalidArgumentException('Cannot load an empty mode in the context.');
    	}
    	
    	if(!in_array($mode, self::$current)){
    		self::$current[] = $mode;
    	}
    }
221302
protected function initialize(InputInterface $input, OutputInterface $output)
    {

        parent::initialize($input, $output);

        $translationMode = $input->getOption('mode');
        $validModes      = array(
            'reviewed',
            'translated',
            'default'
        );
        if (!in_array($translationMode, $validModes)) {
            throw new \InvalidArgumentException(
                sprintf(
                    'Invalid translation mode %s specified. Must be one of %s',
                    $translationMode,
                    implode(', ', $validModes)
                )
            );
        }
    }
206880
public function setConditionMode(string $conditionMode)
    {
        if (!in_array($conditionMode, [self::CONDITION_MODE_AND, self::CONDITION_MODE_OR], true)) {
            throw Exception\InvalidArgumentException::format(
                'Invalid condition mode supplied to %s: expecting one of (%s), \'%s\' given',
                __METHOD__, Debug::formatValues([self::CONDITION_MODE_AND, self::CONDITION_MODE_OR]), $conditionMode
            );
        }

        $this->conditionMode = $conditionMode;

        return $this;
    }
267577
public function processCallback($mode, $data)
    {
        if (isset($this->container->output)) {
            $this->container->output->write($data);
        }
    }
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;
    }
248547
public function setMode($mode)
    {
        if (in_array($mode, $this->availableModes)) {
            $this->mode = $mode;
        }

        throw new \Exception("$mode is not a available mode for this API.");
    }
515850
public function setMode($mode) {
        if (!empty($mode)) {
            $mode = strtolower($mode);
            if (!array_key_exists($mode, $this->supportedModes)) {
                throw new \Cityware\Exception\InvalidArgumentException(
                "The mode $mode is not supported by " . __CLASS__
                );
            }
            $this->mode = $mode;
        }

        return $this;
    }
1260379
public function setMode($mode)
    {
        $fs = FileSystem::getFileSystem();

        $fs->chmod($this->getPath(), $mode);
    }