NAME

OpenInteract2::ResultsIterator - Iterator to scroll through search results that are objects of different classes.

SYNOPSIS

 my $results = OpenInteract2::ResultsManage->new(
                              { search_id => $search_id });
 my $iter = $results->retrieve({ return => 'iterator' });
 while ( my $obj = $iter->get_next ) {
     print "Object is a ", ref( $obj ), " with ID ", $obj->id, "\n";
 }

DESCRIPTION

This class implements SPOPS::Iterator so we can scroll through search results one at a time.

Note that the objects it returns do not necessarily have to be SPOPS objects. At a minimum the class must implement:

And the object must implement:

METHODS

initialize( \%params )

See the SPOPS::Iterator method for the arguments to new(), which calls this method before returning the iterator.

Initializes the iterator with:

fetch_object

Returns the next object from the iterator. If called in list context returns a three-item list with: the returned object, place number of object in iterator, and a hashref with any additional data associated with the result.

SEE ALSO

SPOPS::Iterator

OpenInteract2::ResultsManage

COPYRIGHT

Copyright (c) 2001-2005 Chris Winters. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHORS

Chris Winters <chris@cwinters.com>

Generated from the OpenInteract 1.99_06 source.