Set result mode

@param integer $mode
@return $this
@throws InvalidArgumentException
762946
public function setResultMode($mode)
    {
        if( !is_int($mode) || $mode < 0 || $mode > 3 ) {
            throw new InvalidArgumentException("Invalid result mode");
        }
        $this->resultMode = $mode;
        return $this;
    }
578781
public function setMethod($method) {
        if (!is_string($method))                 throw new IllegalTypeException('Illegal type of parameter $method: '.gettype($method));
        if ($method!=='GET' && $method!=='POST') throw new InvalidArgumentException('Invalid argument $method: '.$method);

        $this->method = $method;
        return $this;
    }
542071
public function fetch($mode = PDO::FETCH_ASSOC)
    {
        if (!$this->stmt) {
            $this->execute();
        }

        return $this->stmt->fetch($mode);
    }
1053335
public function round($precision = 0, $mode = PHP_ROUND_HALF_UP)
    {
        $this->number = round($this->number, $precision, $mode);

        return $this;
    }
696986
public function setRedirectMode($redirectMode)
    {
        $redirectMode = (int)$redirectMode;
        if ($redirectMode < 300 || $redirectMode  >= 400) {
            throw new InvalidArgumentException(
                'Invalid HTTP status for redirect mode'
            );
        }

        $this->redirectMode = $redirectMode;
        return $this;
    }
1231107
public function transformMode($mode)
    {
        if (\array_key_exists($mode, $this->modes))
        {
            return $this->modes[$mode];
        }

        throw new \UnexpectedValueException("Mode {$mode} does not exist");
    }
941369
public function setFetchMode($mode)
    {
        switch ($mode) {
            case Zend_Db::FETCH_NUM:   // seq array
            case Zend_Db::FETCH_ASSOC: // assoc array
            case Zend_Db::FETCH_BOTH:  // seq+assoc array
            case Zend_Db::FETCH_OBJ:   // object
                $this->_fetchMode = $mode;
                break;
            case Zend_Db::FETCH_BOUND:   // bound to PHP variable
                /**
                 * @see Zend_Db_Adapter_Db2_Exception
                 */
                // require_once 'Zend/Db/Adapter/Db2/Exception.php';
                throw new Zend_Db_Adapter_Db2_Exception('FETCH_BOUND is not supported yet');
                break;
            default:
                /**
                 * @see Zend_Db_Adapter_Db2_Exception
                 */
                // require_once 'Zend/Db/Adapter/Db2/Exception.php';
                throw new Zend_Db_Adapter_Db2_Exception("Invalid fetch mode '$mode' specified");
                break;
        }
    }
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';
        }
    }
853863
final protected function setWriteMode($mode)
    {
        if (!in_array($mode, [static::WRITE_MODE_INSERT, static::WRITE_MODE_UPSERT, static::WRITE_MODE_UPDATE])) {
            throw new \InvalidArgumentException(sprintf('Passed write mode "%s" is invalid!', $mode));
        }
        $this->writeMode = $mode;
    }
1187990
public function set_mode($mode){
    if ( router::is_mode($mode) ){
      $this->mode = $mode;
    }
    return $this->mode;
  }
446884
public function set_mode(string $mode){
    if ( !empty($mode) && in_array($mode, $this->modes) ){
      $this->mode = $mode;
      return $this;
    }
    die(_('Error: mode not allowed.'));
  }
189484
public function inMode( $mode )
	{
		if ( !is_array($mode) )
		{
			$mode = func_get_args();
		}

		return in_array( $this->reset_mode, $mode );
	}
281845
public function setPaymentMode($mode)
    {

        try {
            if ($mode instanceof PagSeguroPaymentMode) {
                $this->paymentMode = $mode;
            } else {
                $this->paymentMode = new PagSeguroPaymentMode($mode);
            }
        } catch (Exception $e) {
            die($e->getMessage());
        }
    }
772960
public function matchMode($mode)
    {
        if (!self::validMatchMode($mode)) {
            throw new WURFL_WURFLException('Invalid Match Mode: '.$mode);
        }
        $this->matchMode = $mode;
        return $this;
    }
766314
public function setRequestMode($requestMode)
    {
        if (null !== $requestMode && (self::REQUEST_MODE_ASYNCHRONOUS !== $requestMode && self::REQUEST_MODE_SYNCHRONOUS !== $requestMode)) {
            throw new \InvalidArgumentException("invalid mode [{$requestMode}], expecting one of self::REQUEST_MODE_*");
        }
        $this->requestMode = $requestMode;
    }
648457
public function setMode($mode)
    {
        Validate::isString($mode, 'mode');
        Validate::isTrue(Mode::isValid($mode), Resources::INVALID_CHANGE_MODE_MSG);

        $this->_mode = $mode;
    }
504354
public function setStatus($status)
    {
        $status = strtoupper($status);
        if ($status == self::STATUS_CANCELLED
            || $status == self::STATUS_CONFIRMED
            || $status == self::STATUS_TENTATIVE
        ) {
            $this->status = $status;
        } else {
            throw new \InvalidArgumentException('Invalid value for status');
        }

        return $this;
    }