Set the default fetch mode for this statement.

@param int   $mode The fetch mode.
@return bool
@throws Zend_Db_Statement_Exception
557009
public function setFetchMode($mode)
    {
        $this->_fetchMode = $mode;
        try {
            return $this->_stmt->setFetchMode($mode);
        } catch (PDOException $e) {
            // require_once 'Zend/Db/Statement/Exception.php';
            throw new Zend_Db_Statement_Exception($e->getMessage(), $e->getCode(), $e);
        }
    }
943701
public function fetch($fetchMode = \PDO::FETCH_BOTH)
    {
        $fetchResult = $this->mysqliStatement->fetch();

        if ($fetchResult === false) {
            throw new MysqliException($this->mysqliStatement->error, $this->mysqliStatement->errno);
        }

        if ($fetchResult === null) {
            return;
        }

        $values = array();
        foreach ($this->result as $value) {
            $values[] = $value;
        }

        if ($fetchMode === null) {
            $fetchMode = $this->defaultFetchMode;
        }

        switch ($fetchMode) {
            case \PDO::FETCH_NUM:
                return $values;
            case \PDO::FETCH_ASSOC:
                return array_combine($this->resultFields, $values);
            case \PDO::FETCH_BOTH:
                $result = array_combine($this->resultFields, $values);
                $result += $values;

                return $result;
            default:
                throw MysqliException::fetchModeNotSupported($fetchMode);
        }
    }
1268552
public function setStatement( $statement, $fetchMode = \PDO::FETCH_ASSOC )
    {
        if ( null !== ( $this->_statement = $statement ) )
        {
            $this->_statement->setFetchMode( $fetchMode );
        }

        return $this;
    }
64874
public function set(string $mode): bool {
    $auth = false;
    file_exists($mode);
    switch ($mode) {
      case Debug::HOMOLOGATION:
      case Debug::DEVELOPER:
        ini_set('display_errors', true);
        error_reporting(E_ALL);
        $auth = true;
        break;
      case Debug::PRODUCTION:
        $auth = true;
      default:
        ini_set('display_errors', false);
        error_reporting(E_ERROR);
        $auth = $auth ?? false;
        break;
    }
    return $auth;
  }
1309921
public function setFetchMode($mode, $complement_info = null, array $ctor_args = array()) {
        $fetchMode = new FetchMode($mode, $complement_info, $ctor_args);
        $this->attributes[DB::ATTR_DEFAULT_FETCH_MODE] = serialize($fetchMode);
    }
747319
public function setFromToDefaultFrom() {
        $from = self::getDefaultFrom();
        if($from === null) {
            // require_once 'Zend/Mail/Exception.php';
            throw new Zend_Mail_Exception(
                'No default From Address set to use');
        }

        $this->setFrom($from['email'], $from['name']);

        return $this;
    }
716480
public function mode($mode = null)
    {
        if (func_num_args() === 0) {
            return $this->_mode;
        }
        $this->_mode = $mode;
        return $this;
    }
1201148
public function setFetchMode() {
		$funcArgs = func_get_args();
		switch(func_num_args()) {
			case 0:
				throw new Exception('The fetch mode must be one of the PDO::FETCH_* constants');
			case 2:
				if (is_int($funcArgs[1])) {
					$this->_fetchModeColNo = $funcArgs[1];
				}
				elseif (is_object($funcArgs[1])) {
					$this->_fetchModeObject = $funcArgs[1];
				}
				else {
					$this->_fetchModeClassName = $funcArgs[1];
				}
				break;
			case 3:
				if (!is_array($funcArgs[2])) {
					throw new Exception('$ctorargs parameter must be array');
				}
				$this->_fetchModeClassName = $funcArgs[1];
				$this->_fetchModeClassNameCtorArgs = $funcArgs[2];
				break;
			default:

		}
		$this->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, $funcArgs[0]);
	}
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.'));
  }
206011
public function setFetchMode($fetch)
    {
        $this->fetch = $fetch;

        $this->pdo->setAttribute(
            PDO::ATTR_DEFAULT_FETCH_MODE,
            $fetch
        );
    }
882823
private function setMode(int $mode)
    {
        $this->mode = $mode;
        $this->modeStartLine = $this->line;
        $this->modeStartPosition = $this->getCurrentLinePosition();
    }
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;
    }
1303230
private function convertFetchString($fetchMode){
        if (is_int($fetchMode)) return $fetchMode;

        switch($fetchMode){
            case "LAZY":
                return ClassMetadataInfo::FETCH_LAZY;
            case "EAGER":
                return ClassMetadataInfo::FETCH_EAGER;
            case "EXTRA_LAZY":
                return ClassMetadataInfo::FETCH_EXTRA_LAZY;
            default:
                return ClassMetadataInfo::FETCH_LAZY;
        }
    }
525122
function fetch($fetchMode = PDO::FETCH_ASSOC) {
        return $this->_data($this->query()->fetch($fetchMode),false);
        //return $this->query()->fetch($fetchMode);
    }
632636
public function isDefault($db)
    {
        if(!$db instanceof Zend_Db_Adapter_Abstract) {
            $db = $this->getDb($db);
        }

        return $db === $this->defaultDb;
    }
262733
public function setMode($mode) {

		if(false === is_string($mode)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($mode)), E_USER_ERROR);
		}

		$this -> mode = $mode;

		return $this;
	}
504831
public function setFetchMode(
        $mode,
        $colClassOrObj = null,
        array $ctorArgs = array()
    )
    {
        //52: $this->_statement->setFetchMode(PDO::FETCH_ASSOC);
        if ($colClassOrObj !== null || !empty($ctorArgs)) {
            throw new PDOException('Second and third parameters are not implemented for PoolPDOStatement::setFetchMode()');
            //see http://www.php.net/manual/en/pdostatement.setfetchmode.php
        }
        $this->_fetchMode = $mode;
        return true;
    }