public function restrictToCollections($collections)
    {
        if ($this->databoxes) {
            throw new \LogicException('You can not restrict on databoxes and collections simultanously');
        }

        $this->collections = [];

        foreach ($this->toIterator($collections) as $collection) {
            if (!$collection instanceof \collection) {
                throw new \InvalidArgumentException('Restrict to collections only accept collections as argument');
            }
            $this->collections[] = $collection;
        }

        return $this->collections;
    }