public function setCollection($name) : void
    {
        if (is_array($name)) {
            if (! isset($name['name'])) {
                throw new InvalidArgumentException('A name key is required when passing an array to setCollection()');
            }
            $this->collectionCapped = $name['capped'] ?? false;
            $this->collectionSize   = $name['size'] ?? 0;
            $this->collectionMax    = $name['max'] ?? 0;
            $this->collection       = $name['name'];
        } else {
            $this->collection = $name;
        }
    }