public function setFetchMode($mode, ...$args) {
        if (is_string($mode)) {
            array_unshift($args, PDO::$mode);
            $mode = PDO::FETCH_CLASS;
        }
        $this->fetchArgs = array_merge([$mode], $args);

        return $this;
    }
public function setFetchMode($mode, ...$args) {
        if (is_string($mode)) {
            array_unshift($args, PDO::$mode);
            $mode = PDO::FETCH_CLASS;
        }
        $this->fetchArgs = array_merge([$mode], $args);

        return $this;
    }
public function setFetchMode ( $ mode , ... $ args ) { if ( is_string ( $ mode ) ) { array_unshift ( $ args , PDO :: $ mode ) ; $ mode = PDO :: FETCH_CLASS ; } $ this -> fetchArgs = array_merge ( [ $ mode ] , $ args ) ; return $ this ; }
Set the default fetch mode.

@param int|string $mode One of the **PDO::FETCH_*** constants or a class name.
@param mixed ...$args Additional arguments for {@link \PDOStatement::fetchAll()}.
@return $this
@see http://php.net/manual/en/pdostatement.fetchall.php
Set the default fetch mode .