public function setItems(iterable $items): void
    {
        if ($items instanceof ItemList) {
            $this->items = clone $items;
        } else {
            $this->items = new ItemList();
            foreach ($items as $item) {
                $this->items->insert($item);
            }
        }
    }
public function setItems(iterable $items): void
    {
        if ($items instanceof ItemList) {
            $this->items = clone $items;
        } else {
            $this->items = new ItemList();
            foreach ($items as $item) {
                $this->items->insert($item);
            }
        }
    }
public function setItems ( iterable $ items ) : void { if ( $ items instanceof ItemList ) { $ this -> items = clone $ items ; } else { $ this -> items = new ItemList ( ) ; foreach ( $ items as $ item ) { $ this -> items -> insert ( $ item ) ; } } }
Set a list of items all at once.

@param iterable $items
Set a list of items all at once .