diff options
Diffstat (limited to 'program/lib/Roundcube/rcube_result_multifolder.php')
-rw-r--r-- | program/lib/Roundcube/rcube_result_multifolder.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/program/lib/Roundcube/rcube_result_multifolder.php b/program/lib/Roundcube/rcube_result_multifolder.php index ac0889526..74a3d7805 100644 --- a/program/lib/Roundcube/rcube_result_multifolder.php +++ b/program/lib/Roundcube/rcube_result_multifolder.php @@ -169,6 +169,21 @@ class rcube_result_multifolder } /** + * Slices data set. + * + * @param $offset Offset (as for PHP's array_slice()) + * @param $length Number of elements (as for PHP's array_slice()) + * + */ + public function slice($offset, $length) + { + $data = array_slice($this->get(), $offset, $length); + + $this->index = $data; + $this->meta['count'] = count($data); + } + + /** * Filters data set. Removes elements not listed in $ids list. * * @param array $ids List of IDs to keep. |