Formats the next row according to the formatting parameters provided.

@todo Handle when there are no more rows to get - return false?

@param  integer $how
@param  integer $orientation
@param  integer $offset
@return mixed
550919
public function fetch($how, $orientation, $offset)
    {
        $rows = $this->getRows();

        if (!isset($rows[$this->current_index])) {
            return false;
        }

        $row = $rows[$this->current_index];

        $this->current_index++;

        return $row->format($how, $orientation, $offset);
    }
441482
public function fetch($fetch_style = PDO::FETCH_ASSOC, $cursor_orientation = PDO::FETCH_ORI_NEXT, $cursor_offset = 0)
    {
        return $this->PDO->fetch($fetch_style, $cursor_orientation, $cursor_offset);
    }
1045858
public function utcOffset(int $offset = null)
    {
        if (func_num_args() < 1) {
            return $this->offsetMinutes;
        }

        return $this->setTimezone(static::safeCreateDateTimeZone($offset / static::MINUTES_PER_HOUR));
    }
289046
public function limit($offset, $rows = 0)
    {
        $offset = (int)($offset > 0 ? $offset : 0);
        $rows   = (int)($rows > 0 ? $rows : 0);
        
        $this->options['limit'] = "{$offset}, {$rows}";
        
        return $this;
    }
1101906
public function seek($offset, $whence = SEEK_SET)
    {
        return $whence === SEEK_SET
            ? $this->body->seek(max($this->offset, min($this->offset + $this->limit, $offset)))
            : false;
    }
196082
public function setPageOrientation(string $orientation): PdfInterface
    {
        $this->setProperty('pageOrientation', strtoupper($orientation[0]));

        $this->pageOrientation === 'L'
            ? $this->setProperty('pageFormat', $this->pageSize . '-' . $this->pageOrientation)
            : $this->setProperty('pageFormat', $this->pageSize);

        return $this;
    }
1363087
public function setOffset($offset, $field = null)
    {
        $param = $this->buildParam('facet.offset', $field);
        return $this->set($param, $offset);
    }
1199172
public function flip($direction = self::FLIP_X)
    {
        //原图宽度和高度
        $w = $this->info['width'];
        $h = $this->info['height'];

        do {

            $img = imagecreatetruecolor($w, $h);

            switch ($direction) {
                case self::FLIP_X:
                    for ($y = 0; $y < $h; $y++) {
                        imagecopy($img, $this->im, 0, $h - $y - 1, 0, $y, $w, 1);
                    }
                    break;
                case self::FLIP_Y:
                    for ($x = 0; $x < $w; $x++) {
                        imagecopy($img, $this->im, $w - $x - 1, 0, $x, 0, 1, $h);
                    }
                    break;
                default:
                    throw new ImageException('不支持的翻转类型');
            }

            imagedestroy($this->im);
            $this->im = $img;

        } while (!empty($this->gif) && $this->gifNext());

        return $this;
    }
448575
public function flip($direction)
    {

        $new = imagecreatetruecolor($this->width, $this->height);
        imagealphablending($new, false);
        imagesavealpha($new, true);

        switch (strtolower($direction)) {

            case 'y':
                for ($y = 0; $y < $this->height; $y++) {
                    imagecopy($new, $this->image, 0, $y, 0, $this->height - $y - 1, $this->width, 1);
                }
                break;

            default:
                for ($x = 0; $x < $this->width; $x++) {
                    imagecopy($new, $this->image, $x, 0, $this->width - $x - 1, 0, 1, $this->height);
                }
                break;

        }

        $this->image = $new;

        return $this;

    }
729505
public function fetch($style = null, $orientation = null, $offset = null)
    {
        set_error_handler(array($this->_pdooci,"errorHandler"));
        try {
            $style = is_null($style) ? $this->_fetch_sty : $style;
            $this->_fetch_sty = $style;
            $rst   = null;

            switch ($style)
            {
            case \PDO::FETCH_BOTH:
            case \PDO::FETCH_BOUND:
                $rst = \oci_fetch_array($this->_stmt, \OCI_BOTH + \OCI_RETURN_NULLS);
                break;
            case \PDO::FETCH_ASSOC:
                $rst = \oci_fetch_array($this->_stmt, \OCI_ASSOC + \OCI_RETURN_NULLS);
                $rst = $this->_fixResultKeys($rst);
                break;
            case \PDO::FETCH_NUM:
                $rst = \oci_fetch_array($this->_stmt, \OCI_NUM + \OCI_RETURN_NULLS);
                break;
            case \PDO::FETCH_OBJ:
                $rst = \oci_fetch_object($this->_stmt);
                break;
            }
            $this->_current = $rst;
            $this->_checkBinds();
        } catch (\Exception $e) {
            throw new \PDOException($e->getMessage());
        }
        restore_error_handler();
        return $rst;
    }
1321053
protected function _formatRow(array $row) {
        $out = '';
        foreach ($row as $key => $value) {
            if (is_array($value)) {
                // This is the case with hasMany and hasAndBelongsToMany related
                // rowsets.
                $value = $this->_formatRelatedRowset($value);
            }
            $out .= "$key: $value\n";
        }
        return $out;
    }
683650
public function seek($offset, $whence = SEEK_SET)
    {
        if (!is_int($offset) && !is_numeric($offset)) {
            return false;
        }

        $offset = (int) $offset;
        if ($offset < 0) {
            return false;
        }

        $key = $this->iterator->key();
        if (!is_int($key) && !is_numeric($key)) {
            $key = 0;
            $this->iterator->rewind();
        }

        if ($key >= $offset) {
            $key = 0;
            $this->iterator->rewind();
        }

        while ($this->iterator->valid() && $key < $offset) {
            $this->iterator->next();
            ++$key;
        }

        $this->position = $key;

        return true;
    }
586904
public function loadColumn($offset = 0)
	{
		// Initialise variables
		$column = [];

		// Execute the query
		if (!$this->execute())
		{
			return null;
		}

		// Get all of the rows from the result set as arrays
		while ($row = $this->fetchArray())
		{
			$column[] = $row[$offset];
		}

		// Free up system resources and return
		$this->freeResult();

		return $column;
	}
624869
protected function indent($offset = 0)
    {

        return $this->isPretty()
            ? str_repeat($this->options['indent_style'], ($this->level + $offset) * $this->options['indent_width'])
            : '';
    }
1088316
public function format_row($row) {
        if ($this->rownum < 0) {
            $this->rownum = $this->currpage * $this->pagesize;
        } else {
            $this->rownum += 1;
        }

        return parent::format_row($row);
    }
828129
public static function formatGmtOffset($offset) {
        $hours = intval($offset / 3600);
        $minutes = abs(intval($offset % 3600 / 60));
        return 'GMT' . ($offset ? sprintf('%+03d:%02d', $hours, $minutes) : '');
    }
981241
public function offset($offset)
    {
        if ($this->queryType !== self::QUERY_SELECT) {
            $this->exception = new QueryException("Offset can only be applied on SELECT mode!", 0, $this->exception);
            return $this;
        }
        if (! is_int($offset) || $offset < 0) {
            $this->exception = new QueryException("Offset value should be an positive integer!", 0, $this->exception);
            return $this;
        }
        $this->limitOffset = intval($offset);

        return $this;
    }