class Collection implements CollectionInterface
{
// ...
public function slice(int $offset, int $limit): self
{
$this->items = array_slice($this->items, $offset, $limit);
return $this;
}
public function getIterator()
{
return new \ArrayIterator($this->items);
}
// ...
}