public function slice($offset = null, $limit = null) { if ($offset === null && $limit === null) { return $this; } $collection = clone $this; $collection->data = array_slice($collection->data, $offset, $limit); return $collection; }
/** * {@inheritdoc} */ public function getSlice($offset, $length) { return $this->collection->slice($offset, $length); }