Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
core_search\skip_future_documents_iterator Class Reference

Iterator for skipping search recordset documents that are in the future. More...

Inheritance diagram for core_search\skip_future_documents_iterator:

Public Member Functions

 __construct (\Iterator $parent, $cutoff=0)
 Constructor.
 
 current ()
 
 key ()
 
 next ()
 
 rewind ()
 
 valid ()
 

Protected Attributes

mixed $currentdoc
 Current value of iterator.
 
int $cutoff
 Cutoff time; anything later than this will cause the iterator to stop.
 
bool $gotcurrent
 True if current value is available.
 
Iterator $parent
 Parent iterator.
 

Detailed Description

Iterator for skipping search recordset documents that are in the future.

This iterator stops iterating if it receives a document that was modified later than the specified cut-off time (usually current time).

This iterator assumes that its parent iterator returns documents in modified order (which is required to be the case for search indexing). This means we will stop retrieving data from the recordset

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

core_search\skip_future_documents_iterator::__construct ( \Iterator $parent,
$cutoff = 0 )

Constructor.

Parameters
Iterator$parentParent iterator, must return search documents in modified order
int$cutoffCut-off time, default is current time

The documentation for this class was generated from the following file: