Packages

  • dibi
    • drivers
    • nette
    • reflection
  • None
  • PHP

Classes

  • dibi
  • DibiConnection
  • DibiDataSource
  • DibiDateTime
  • DibiEvent
  • DibiFileLogger
  • DibiFirePhpLogger
  • DibiFluent
  • DibiObject
  • DibiResult
  • DibiResultIterator
  • DibiRow
  • DibiTranslator

Interfaces

  • IDataSource
  • IDibiDriver
  • IDibiReflector
  • IDibiResultDriver

Exceptions

  • DibiDriverException
  • DibiException
  • DibiNotImplementedException
  • DibiNotSupportedException
  • DibiPcreException
  • Overview
  • Package
  • Class
  • Tree

Class DibiResultIterator

External result set iterator.

This can be returned by DibiResult::getIterator() method or using foreach

$result = dibi::query('SELECT * FROM table');
foreach ($result as $row) {
   print_r($row);
}
unset($result);
DibiResultIterator implements Iterator, Countable
Package: dibi
Author: David Grudl
Located at libs/DibiResultIterator.php
Methods summary
public
# __construct( DibiResult $result )

Parameters

$result
DibiResult
public
# rewind( )

Rewinds the iterator to the first element.

Rewinds the iterator to the first element.

Implementation of

Iterator::rewind
public mixed
# key( )

Returns the key of the current element.

Returns the key of the current element.

Returns

mixed

Implementation of

Iterator::key
public mixed
# current( )

Returns the current element.

Returns the current element.

Returns

mixed

Implementation of

Iterator::current
public
# next( )

Moves forward to next element.

Moves forward to next element.

Implementation of

Iterator::next
public boolean
# valid( )

Checks if there is a current element after calls to rewind() or next().

Checks if there is a current element after calls to rewind() or next().

Returns

boolean

Implementation of

Iterator::valid
public integer
# count( )

Required by the Countable interface.

Required by the Countable interface.

Returns

integer

Implementation of

Countable::count
dibi API documentation API documentation generated by ApiGen 2.3.0