Dibi\Drivers\FirebirdDriver::fetch PHP Method

fetch() public method

Fetches the row at current position and moves the internal cursor to the next position.
public fetch ( $assoc ) : array
return array array on success, nonarray if no next record
    public function fetch($assoc)
    {
        $result = $assoc ? @ibase_fetch_assoc($this->resultSet, IBASE_TEXT) : @ibase_fetch_row($this->resultSet, IBASE_TEXT);
        // intentionally @
        if (ibase_errcode()) {
            if (ibase_errcode() == self::ERROR_EXCEPTION_THROWN) {
                preg_match('/exception (\\d+) (\\w+) (.*)/is', ibase_errmsg(), $match);
                throw new Dibi\ProcedureException($match[3], $match[1], $match[2]);
            } else {
                throw new Dibi\DriverException(ibase_errmsg(), ibase_errcode());
            }
        }
        return $result;
    }