From 5f168c9427f5d80bf5746c7e449450233bfcef3c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 4 Nov 2016 13:47:21 +0000 Subject: [PATCH] Bug 17552: Revert "Bug 17091: Remove explicit declaration of Koha::Objects->reset" This reverts commit c253af2e519570c4024891dc4d1e81743a2c5fc2. --- Koha/Objects.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Koha/Objects.pm b/Koha/Objects.pm index 176821a..da2f2c9 100644 --- a/Koha/Objects.pm +++ b/Koha/Objects.pm @@ -181,6 +181,23 @@ sub next { return $object; } +=head3 Koha::Objects->reset(); + +Koha::Objects->reset(); + +resets iteration so the next call to next() will start agein +with the first object in a set. + +=cut + +sub reset { + my ( $self ) = @_; + + $self->_resultset()->reset(); + + return $self; +} + =head3 Koha::Objects->as_list(); Koha::Objects->as_list(); -- 2.1.4