Set Authentication Mode.

@param string $mode
164697
public function setAuthMode($mode)
    {
        if (!class_exists($mode)) {
            throw new \Exception(sprintf(
                "Class %s doesn't exists",
                $mode
            ));
        }

        $this->authMode = $mode;

        $authClass = is_string($mode) ? new $mode() : $mode;
        if (!$authClass instanceof SecurityInterface) {
            throw new \Exception(sprintf(
                'Auth mode must be intstance of %s',
                SecurityInterface::class
            ));
            exit;
        }

        $this->security = $authClass;
        $this->authMode = get_class($this->security);

        if ($this->authDir) {
            $this->security->setPath($this->authDir);
        }
    }
648457
public function setMode($mode)
    {
        Validate::isString($mode, 'mode');
        Validate::isTrue(Mode::isValid($mode), Resources::INVALID_CHANGE_MODE_MSG);

        $this->_mode = $mode;
    }
882823
private function setMode(int $mode)
    {
        $this->mode = $mode;
        $this->modeStartLine = $this->line;
        $this->modeStartPosition = $this->getCurrentLinePosition();
    }
395643
public function setWriteMode($mode)
    {
        if (!in_array($mode, $this->validWriteModes, true)) {
            throw new InvalidArgumentException("Invalid write mode specified: $mode");
        }

        $this->config["writeMode"] = $mode;
        $this->createFileHandler();
    }
716480
public function mode($mode = null)
    {
        if (func_num_args() === 0) {
            return $this->_mode;
        }
        $this->_mode = $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;
    }
568451
public function setMode($mode) {
		$editMode = ($mode=="on")?true:false;
		//SessionUtils::setMessageEditionMode($editMode);
		if ($editMode) {
			$_SESSION["FINE_MESSAGE_EDITION_MODE"] = true;
			$this->isMessageEditionMode = true;
		} else {
			unset($_SESSION["FINE_MESSAGE_EDITION_MODE"]);
		}

		$this->content->addFile('../utils.i18n.fine/src/views/enableDisableEdition.php', $this);
		$this->template->toHtml();
	}
137589
public function mode($mode)
    {
        if ($mode !== false) {
            $this->staging = true;
        } else {
            $this->staging = false;
        }
    }
1249195
public static function setNewFileMode(string $mode = '740'): void
    {
        static::init();
        static::$newFileMode = \preg_match('/^[0-7]{3}$/', $mode) ? \intval($mode, 8) : 0740;
    }
241569
public function setTransferMode( $mode )
	{
		if( $mode != FTP_BINARY && $mode != FTP_ASCII )
			return FALSE;
		$this->mode	= $mode;
		return TRUE;
	}
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';
        }
    }
1148226
public function setMatchMode($mode)
    {
        assert($mode == SPH_MATCH_ALL
            || $mode == SPH_MATCH_ANY
            || $mode == SPH_MATCH_PHRASE
            || $mode == SPH_MATCH_BOOLEAN
            || $mode == SPH_MATCH_EXTENDED
            || $mode == SPH_MATCH_FULLSCAN
            || $mode == SPH_MATCH_EXTENDED2);
        $this->_mode = $mode;

        return $this;
    }
844818
public function withSSL(int $mode = self::SSL_AUTO): self
    {
        $this->ssl = $mode;

        return $this;
    }
144099
public function setLoggingMode($mode, $filename = NULL) {
		$this->logging_mode = $mode;
		$this->log_filename = $filename;
	}
733349
public function setMode($mode)
    {
        if (!in_array($mode, [
            GetOpt::NO_ARGUMENT,
            GetOpt::OPTIONAL_ARGUMENT,
            GetOpt::REQUIRED_ARGUMENT,
            GetOpt::MULTIPLE_ARGUMENT,
        ], true)) {
            throw new \InvalidArgumentException(sprintf(
                'Option mode must be one of %s, %s, %s and %s',
                'GetOpt::NO_ARGUMENT',
                'GetOpt::OPTIONAL_ARGUMENT',
                'GetOpt::REQUIRED_ARGUMENT',
                'GetOpt::MULTIPLE_ARGUMENT'
            ));
        }
        $this->mode = $mode;
        return $this;
    }
1215064
public function setAuthentication($credentials)
    {
        $this->authentication = $credentials;
        curl_setopt($this->curl, CURLOPT_USERPWD, $credentials);
    }
1187990
public function set_mode($mode){
    if ( router::is_mode($mode) ){
      $this->mode = $mode;
    }
    return $this->mode;
  }