slice() public method

Returns a slice of the collection
public slice ( integer $offset = null, integer $limit = null ) : Collection
$offset integer The optional index to start the slice from
$limit integer The optional number of elements to return
return Collection
 /**
  * {@inheritdoc}
  */
 public function getSlice($offset, $length)
 {
     return $this->collection->slice($offset, $length);
 }
 /**
  * {@inheritdoc}
  */
 public function slice($offset, $length = null)
 {
     $this->initialize();
     return $this->coll->slice($offset, $length);
 }