code: public function slice($offset, $length = null)
      {
          $array = [];
          
          foreach ($this->collection->slice($offset, $length) as $element) {
              $array[$this->getKey($element)] = $element;
          }
          
          return $array;
      }
docs: {@inheritDoc}