Sets the API match mode
@param string $mode
@return WURFL_Configuration_InMemoryConfig
772960
public function matchMode($mode)
    {
        if (!self::validMatchMode($mode)) {
            throw new WURFL_WURFLException('Invalid Match Mode: '.$mode);
        }
        $this->matchMode = $mode;
        return $this;
    }
37936
public function setMemo($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->memo !== $v) {
            $this->memo = $v;
            $this->modifiedColumns[] = UserPeer::MEMO;
        }


        return $this;
    }
375415
public function setMode($mode)
    {
        $this->mode = $mode;

        if ($this->mode === self::MODE_PRODUCTION) {
            $this->api_endpoint = 'https://api.payex.com';
        } else {
            $this->api_endpoint = 'https://api.externalintegration.payex.com';
        }
    }
314304
public function setDefaultMode(string $mode = null) : RauthInterface
    {
        if (!in_array($mode, self::MODES)) {
            throw new \InvalidArgumentException(
                'Mode ' . $mode . ' not accepted!'
            );
        }
        $this->defaultMode = $mode;

        return $this;
    }
539190
public function setMode(string $mode)
    {
        if (self::VISUAL === $mode) {
            $this->find('css', '#content-tmce')->press();
        } else {
            $this->find('css', '#content-html')->press();
        }
    }
740257
public function setFetchMode($mode)
    {
        //check for PDO extension
        if (!extension_loaded('pdo')) {
            /**
             * @see Zend_Db_Adapter_Exception
             */
            // require_once 'Zend/Db/Adapter/Exception.php';
            throw new Zend_Db_Adapter_Exception('The PDO extension is required for this adapter but the extension is not loaded');
        }
        switch ($mode) {
            case PDO::FETCH_LAZY:
            case PDO::FETCH_ASSOC:
            case PDO::FETCH_NUM:
            case PDO::FETCH_BOTH:
            case PDO::FETCH_NAMED:
            case PDO::FETCH_OBJ:
                $this->_fetchMode = $mode;
                break;
            default:
                /**
                 * @see Zend_Db_Adapter_Exception
                 */
                // require_once 'Zend/Db/Adapter/Exception.php';
                throw new Zend_Db_Adapter_Exception("Invalid fetch mode '$mode' specified");
                break;
        }
    }
702322
public function open($mode = 'a') {
        if (is_resource($this->stream)) {
            return $this;
        }
        $this->stream = fopen($this->file->getFullName(), $mode);
        return $this;
    }
341564
public function setMode($value)
    {
        if ($value !== null &&
           $value !== self::MODE_DIALOG &&
           $value !== self::MODE_SRTR) {
            throw new DomainError('Invalid mode');
        }
        $this->parameters['mode'] = $value;
        return $this;
    }
167151
public function match($callable)
    {
        $this->remote = lego_register(
            AutoCompleteMatchHandler::class,
            $callable,
            md5(__CLASS__ . $this->name())
        )->remote();

        return $this;
    }
424163
public function setMapPermission($mode = null)
    {
        $this->permissionError = array();
        $this->permissionErrorRules = array();

        $params = $this->getParams();

        $permissionRules = $this->permissionRules;
        if (isset($mode)) {
            foreach ($permissionRules as &$value) {
                $value = $mode;
            }
        }

        $result = true;
        foreach ($params['permissionMap'] as $type => $items) {

            $permission = $permissionRules[$type];

            foreach ($items as $item) {

                if (file_exists($item)) {

                    try {
                        $this->chmod($item, $permission, true);
                    } catch (\Exception $e) {
                    }

                    $res = is_readable($item);

                    /** check is wtitable */
                    if ($type == 'writable') {

                        $res &= is_writable($item);

                        if (is_dir($item)) {
                            $name = uniqid();

                            try {
                                $res &= $this->getFileManager()->putContents(array($item, $name), 'test');
                                $res &= $this->getFileManager()->removeFile($name, $item);
                            } catch (\Exception $e) {
                                $res = false;
                            }
                        }
                    }

                    if (!$res) {
                        $result = false;
                        $this->permissionError[] = $item;
                        $this->permissionErrorRules[$item] = $permission;
                    }
                }
            }
        }

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

        $fs->chmod($this->getPath(), $mode);
    }
1187990
public function set_mode($mode){
    if ( router::is_mode($mode) ){
      $this->mode = $mode;
    }
    return $this->mode;
  }
30125
public function setConfigMaintenancemode($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->config_maintenancemode !== $v) {
            $this->config_maintenancemode = $v;
            $this->modifiedColumns[] = RemoteHistoryContaoPeer::CONFIG_MAINTENANCEMODE;
        }


        return $this;
    }
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;
    }
899731
public function mode($mode)
    {
        $acceptable_modes = [-1, 0, 1, 2];
        if (!in_array($mode, $acceptable_modes)) {
            throw new JSONLibraryException('bad_mode_set');
        }
        $this->mode = $mode;

        return $this;
    }
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;
	}
387035
protected function match($value, $mode)
    {
        $backup = $this->getMode();

        $this->setMode($mode);

        $result = $this->validate($value);

        $this->setMode($backup);

        return $result;
    }