Copied!

A RecordCursor is the same as an ArrayCursor except is returns a Record object instead of an array

CloneableInstantiableIterable
Methods
public __construct(PHPFUI\ORM\Record $instance, ?PDOStatement $statement = NULL, array $input = [])
 

You must pass an instance if the Record object that will be filled and returned by current() method

public PHPFUI\ORM\BaseCursor::__destruct()
public PHPFUI\ORM\BaseCursor::count() : int
 

count is the actual number of records returned by the query, which should less than or equal to the limit clause if it was used.

See total to get the number of records in the table without a limit clause.

public current() : ?mixed
 
  • return mixed representation of the current row
public PHPFUI\ORM\BaseCursor::key() : int
 

The offset of the row in the query, 0 based

public next() : void
 
public PHPFUI\ORM\BaseCursor::rewind() : void
 

Reset the cursor to the beginning of the set

public PHPFUI\ORM\BaseCursor::setCountSQL(string $limitedSql) : static
 

Sets the count when a limit clause is used.

public PHPFUI\ORM\BaseCursor::setQueryCount(int $count) : self
public PHPFUI\ORM\BaseCursor::setTotalCountSQL(string $totalSql) : static
 

Sets the count for the full query with no limit clause

public PHPFUI\ORM\BaseCursor::total() : int
 

Returns the total number records returned in the query without a limit clause

See count if you need the number of records the query returned.

public valid() : bool
 
Properties
protected ?int PHPFUI\ORM\BaseCursor::$index = NULL
protected readonly array PHPFUI\ORM\BaseCursor::$input
protected ?PDOStatement PHPFUI\ORM\BaseCursor::$statement
Methods
protected PHPFUI\ORM\BaseCursor::init() : void
 

Internal method to make sure rewind is called before anything else but will save the query if never executed.

Properties
private PHPFUI\ORM\Record $current
© 2025 Bruce Wells
Search Namespaces \ Classes
Configuration