add

@param array $items
@param bool  $allowNumericitem
544939
public function add(array $items, $allowNumericitem = false)
    {
        foreach ($items as $item => $_deps) {
            if (! $allowNumericitem and is_int($item)) {
                $this->addItem($_deps);
            } else {
                $this->addItem($item, $_deps);
            }
        }
    }
1356831
public function putItems(array $items)
    {
        foreach ($items as $k => $v) {
            $this->putItem($k, $v);
        }
    }
49489
public function setItemListElements($itemListElements) {
		if (!is_array($itemListElements)) {
		    throw new \Exception('The value is expected to be an array');
		}
		foreach ($itemListElements as $itemListElement) {
		    if (!$itemListElement instanceof Property\ItemListElement) {
		        throw new \Exception('Unexpected value type');
		    }
		}
		$this->itemListElement = $itemListElements;

		return $this;
	}
852004
public function addBody($items)
    {
        if (! is_array($items)) {
            $items = func_get_args();
        }

        $class = $this->getElements()->last();
        if (is_object($class) && get_class($class) === Body::class) {
            $this->addElement(new Html('<hr />'));
        }

        $this->addElement(new Body($items));

        return $this;
    }
1336052
private function _build_items(array $items)
	{
		foreach ($items as $key => $item) {
			$this->_items[$key] = new Element_Item($item, $this, $key);
		}

		return $this;
	}
362934
public function updateItemsData($items)
    {
        $items->each(function ($item) {
            CartItem::where('id', $item->id)->update([
                'name' => $item->name,
                'price' => $item->price,
                'image' => $item->image,
            ]);
        });
    }
949718
public function add(array $items) {
		
		foreach($items as $name => $object) {
			$this->set($name, $object);
		}
		
		return $this;
	}
1061835
public function addItem(GridItem $gridItem)
    {
        if (!$this->items->contains($gridItem)) {
            $this->items->add($gridItem);
        }
    }
766209
public function setDisabledItems($items)
    {
        $controller = Controller::curr();
        $code = $controller->data()->Code;
        $updated = [];
        if (is_array($items) && !empty($items)) {
            foreach ($items as $item) {
                array_push($updated, ProductPage::getGeneratedValue($code, $this->getName(), $item, 'value'));
            }
        }
        $this->disabledItems = $updated;

        return $this;
    }
1343737
public function add(... $items) : Set
    {
        $values = $this->_pushAll($items);
        $this->setValues($values);
        return $this;
    }
1016651
public function add($item)
    {
        if (is_array($item)) {
            return array_map([$this, 'add'], $item);
        }

        if (! $item | strlen(trim($item)) === 0) {
            return false;
        }

        $this->collection[] = trim(strip_tags($item));
    }
1008082
public function setItemsAttribute($items)
    {
        if (!is_array($items)) {
            throw new \InvalidArgumentException('Items must be an array');
        }

        foreach ($items as $key => $item) {
            if (!($item instanceof Item)) {
                $items[$key] = new Item($item);
            }
        }

        $this->attributes['Items'] = $items;

        return $this;
    }
83894
public function add( ...$items )
	{
		foreach ( $items as &$item ) $item = (array)$item;
		$this->items = array_merge( $this->items , ...$items );
		return $this;
	}
485520
public function setItems($items, $where = '')
    {
        if (empty($items)) {
            return;
        }
        if (empty($where)) {
            $this->putItems($items);
        } elseif ($where === 'last') {
            $this->_items = ArrayHelper::insertLast($this->_items, $items);
        } elseif ($where === 'first') {
            $this->_items = ArrayHelper::insertFirst($this->_items, $items);
        } else {
            $this->_items = ArrayHelper::insertInside($this->_items, $items, $where);
        }
    }
150189
function addA(array $items, $weight = 0) {
		foreach ($items as $name => $value) {
			$this->add($name, $value, $weight);
			/** 2016-08-09 Чтобы при вызове @see \Df\Payment\Info\Report::addAfter() не происходило конфликтов. */
			$weight += 10;
		}
	}
845365
protected function guardType($items) : void {
        // this allows guardType($items) to receive
        // both a single item or an array of items
        if ( ! is_array($items)) {
            $items = array($items);
        }

        // throw an exception if any items are not
        // an instance of the required type
        foreach ($items as $item) {
            if ( ! $item instanceof $this->collectionType) {
                throw new \InvalidArgumentException(
                    "Got " . (is_object($item) ? get_class($item) : $item) . " but expected " . $this->collectionType
                );
            }
        }
    }
857163
def safe_add_item(item)
      const_set item.constant_name, item if item.is_a?(ProgneTapera::EnumItem)&&!item_defined?(item)
    end