@param array $storage

@return Slice
435373
public function make(array $storage)
    {
        return new Slice(
            $this->helper,
            $storage,
            $this->withParameters ? $this->parameters : null
        );
    }
1368865
public function slice($offset = 0, $length = null, $preserve_keys = false)
	{
		return array_slice($this->list, $offset, $length, $preserve_keys);
	}
357622
public function slice($offset, $length = null): CollectionInterface
    {
        if ($length < 0) {
            throw new InvalidArgumentException('Negative slice lengths are not supported');
        }

        $result = $this;
        if ($offset < 0) {
            $result = $this->take($offset);
        } elseif ($offset > 0) {
            $result = $this->offset($offset);
        }

        if ($length !== null) {
            $result = $result->take($length);
        }

        return $result;
    }
688982
public function evenKey(array $storage)
    {
        return $this->filter($storage, function ($value, $key)
        {
            return $this->helper->math()->isEven($key);
        });
    }
243792
public function setStorage(Storage $storage)
    {
        $this->getItem()->setPath($storage->getPath().'Tengen Toppa Gurren Lagann (2007) [TV]'.DIRECTORY_SEPARATOR);

        return parent::setStorage($storage);
    }
563849
public function even(array $storage)
    {
        return $this->filter($storage, function ($value)
        {
            return $this->helper->math()->isEven($value);
        });
    }
181981
public function setStorage($storage)
    {
        if (is_string($storage)) {
            $storage = $this->getStoragePlugins()->get($storage);
        } elseif (is_array($storage)) {
            if (!isset($storage['name'])) {
                throw new \Exception('Invalid Storage configuration: Name required.');
            }
            $storage = $this->getStoragePlugins()->get($storage['name'], $storage);
        }
        
        if (!$storage instanceof Storage\StorageInterface) {
            throw new \Exception('Storage must be instance of Spork\Mvc\Listener\Limit\Storage\StorageInterface');
        }
        
        $this->storage = $storage;
        return $this;
    }
478466
private function setKeyValueStorage($storage)
    {
        if (!is_object($storage)) {
            throw new InvalidArgumentException("An instance of valid storage must be provided");
        }

        $storageClasses = class_implements($storage);
        $validStorages = ['Cloudinary\Cache\Storage\KeyValueStorage', 'Psr\SimpleCache\CacheInterface'];

        $found = count(\Cloudinary::array_subset($storageClasses, $validStorages)) > 0;

        if (!$found) {
            throw new InvalidArgumentException("An instance of valid storage must be provided");
        }

        $this->keyValueStorage = $storage;

        return true;
    }
1058322
public static function unwrapClosures(&$data, SplObjectStorage $storage = null)
    {
        if($storage === null){
            $storage = static::$context->scope;
        }

        if($data instanceof static){
            $data = $data->getClosure();
        } elseif (is_array($data)){
            if(isset($data[self::ARRAY_RECURSIVE_KEY])){
                return;
            }
            $data[self::ARRAY_RECURSIVE_KEY] = true;
            foreach ($data as $key => &$value){
                if($key === self::ARRAY_RECURSIVE_KEY){
                    continue;
                }
                static::unwrapClosures($value, $storage);
            }
            unset($data[self::ARRAY_RECURSIVE_KEY]);
        }elseif ($data instanceof \stdClass){
            if(isset($storage[$data])){
                return;
            }
            $storage[$data] = true;
            foreach ($data as &$property){
                static::unwrapClosures($property, $storage);
            }
        } elseif (is_object($data) && !($data instanceof Closure)){
            if(isset($storage[$data])){
                return;
            }
            $storage[$data] = true;
            $reflection = new ReflectionObject($data);

            do{
                if(!$reflection->isUserDefined()){
                    break;
                }
                foreach ($reflection->getProperties() as $property){
                    if($property->isStatic() || !$property->getDeclaringClass()->isUserDefined()){
                        continue;
                    }
                    $property->setAccessible(true);
                    $value = $property->getValue($data);
                    if(is_array($value) || is_object($value)){
                        static::unwrapClosures($value, $storage);
                        $property->setValue($data, $value);
                    }
                };
            } while($reflection = $reflection->getParentClass());
        }
    }
682220
public function sliceProperties(array $properties)
    {
        $actions = $this->internalDataListActions;
        $actions[] = ['sliceProperties', $properties];
        $data = $this->internalDataListUpdateData($this->internalDataListData, $actions);
        $className = get_class($this);
        $list = new $className();
        $class = $this->internalDataListClasses['IvoPetkov\DataListObject'];
        $tempObject = new $class();
        foreach ($data as $index => $object) {
            $object = $this->internalDataListUpdateValueIfNeeded($data, $index);
            $newObject = clone($tempObject);
            foreach ($properties as $property) {
                $newObject[$property] = isset($object->$property) ? $object->$property : null;
            }
            $list->push($newObject);
        }
        return $list;
    }
943913
public static function append($storage, $data = [])
    {
        if (!is_array($storage) || !is_array($data)) {
            throw new ArrayStorageException('Invalid parameters specified');
        }
        foreach ($data as $setting => $value) {
            if (array_key_exists($setting, $storage) &&
                is_array($storage[$setting]) &&
                is_array($value)
            ) {
                $storage[$setting] = self::append($storage[$setting], $value);
            } else {
                $storage[$setting] = $value;
            }
        }
        return $storage;
    }
544877
protected function buildJoin($storage)
    {
        $results = [];

        foreach ($storage as $join)
        {
            /**
             * @var Classes\Join $join
             */
            $results[] = (string)$join;
            $this->push($join->attributes());
        }

        return implode(' ', $results);
    }
239687
public function setStorage(Storage $storage = null)
    {
        if ($this->storage !== $storage) {
            // romove link on this item for old storage
            if ($this->storage instanceof Storage) {
                $tmp = $this->storage;
                $this->storage = null;
                $tmp->removeItem($this);
            }
            $this->storage = $storage;
            // add link on this item
            if ($this->storage instanceof Storage) {
                $this->storage->addItem($this);
            }
        }
        $this->doClearPath();

        return $this;
    }
668826
public function addStorage($name, $storage)
    {

        $isClosure = $storage instanceof Closure;

        if ($name == self::DEFAULT_STORAGE) {
            $this->storage = $isClosure ? $storage($name) : $storage;
            $this->storages[$name] = $this->storage;
            return $this;
        }

        if ($isClosure) {
            $this->bindings[$name] = $storage;
            return $this;
        }

        $this->storages[$name] = $storage;

        return $this;
    }
1192877
public function &offsetGet($key)
    {
        if (!isset($this->storage[$key])) {
            $this->storage[$key] = null;
        }

        return $this->storage[$key];
    }
86427
public function scanAction(Storage $storage)
    {
        $this->get('anime_db.storage.scan_executor')->export($storage);

        return $this->render('AnimeDbCatalogBundle:Storage:scan.html.twig', [
            'storage' => $storage,
        ]);
    }
143734
function slice ($offset = 0, $count = -1)
  {
    $this->setIterator (new LimitIterator ($this->getIterator (), $offset, $count));
    return $this;
  }