RT 4.4.3 Documentation

RT::Shredder::Plugin::Base::Search

Go to latest version →

NAME

RT::Shredder::Plugin::Base - base class for Shredder plugins.

ARGUMENTS

Arguments which all plugins support.

limit - unsigned integer

Allow you to limit search results. Default value is 10.

METHODS

FetchNext $collection [, $init]

Returns next object in collection as method "Next" in RT::SearchBuilder, but doesn't stop on page boundaries.

When method is called with true $init arg it enables pages on collection and selects first page.

Main purpose of this method is to avoid loading of whole collection into memory as RT does by default when pager is not used. This method init paging on the collection, but doesn't stop when reach page end.

Example:

    $plugin->FetchNext( $tickets, 'init' );
    while( my $ticket = $plugin->FetchNext( $tickets ) ) {
        ...
    }
← Back to index