Adds items to specified place.
@param array $items list of items
@param mixed $where
@see setItem()
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);
        }
    }
202054
public function addItems( $items )
	{
		if( $items instanceof UI_HTML_Buffer ) 
			$this->addItem( $items->render() );
		else
			foreach( $items as $item )
				$this->addItem( $item );
	}
228466
public function add($items)
    {
        if (is_array($items)) {
            $this->collection[] = new Delta($items);
        } elseif (is_object($items) && $items instanceof Delta) {
            $this->collection[] = $items;
        }

        return $this;
    }
1216228
public function add($items)
    {
        if (is_array($items)) {
            $this->collection[] = new RecordField($items);
        } elseif (is_object($items) && $items instanceof RecordField) {
            $this->collection[] = $items;
        }

        return $this;
    }
9029
public function setWhere(array $where)
    {
        // When the statement is empty set the
        // where property to null to prevent
        // empty statement errors.
        if (empty($where)) {
            // delete the current where statement
            $this->where = null;

            // Skip further execution
            return $this;
        }

        // Ensure the base $or clause
        if (! isset($where['$or'])) {
            // wrap the statement in an $or clause
            $where = ['$or' => [$where]];
        }

        // Fetch the last clause in the $or array
        // to allow further chaining it's required
        // to be wrapped in an @and statement.
        $lastClause = array_pop($where['$or']);

        if (! isset($lastClause['$and'])) {
            // Wrap in an @and statement
            $lastClause = ['$and' => [$lastClause]];
        }

        // Re-append the $and clause
        $where['$or'][] = $lastClause;

        // Replace the base where statement
        $this->where = $where;

        return $this;
    }
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);
            }
        }
    }
1351607
public function setItems($items)
    {
        foreach ($items as $key => $dtoData) {
            $this->items[$key] = new BlockItemDto($dtoData);
        }
    
        return $this;
    }
461606
public function addContentItems($items = [])
    {
        // Loop on each item.
        collect($items)->each(function ($item) {
            // Add each content to the Container.
            $this->addSingleContentItem($item);
        });

        // Return object.
        return $this;
    }
87956
protected function processItems(array $items)
    {
        $processedItems = [];

        foreach ($items as $entry) {
            $processedItems[] = ModelFactory::make($entry);
        }

        $this->items = new ModelCollection($processedItems);
    }
672377
public function setMultiple(array $items, int $ttl = null): void
    {
        foreach ($items as $key => $value) {
            $this->set($key, $value, $ttl);
        }
    }
545098
public static function insertInside(array $array, $items, $where)
    {
        foreach ($items as $k => $v) {
            unset($array[$k]);
        }
        $before = self::prepareWhere($array, isset($where['before']) ? $where['before'] : null);
        $after  = self::prepareWhere($array, isset($where['after']) ? $where['after'] : null);
        $new    = [];
        $found  = false;
        /// TODO think of realizing it better
        foreach ($array as $k => $v) {
            if (!$found && $k === $before) {
                foreach ($items as $i => $c) {
                    $new[$i] = $c;
                }
                $found = true;
            }
            $new[$k] = $v;
            if (!$found && $k === $after) {
                foreach ($items as $i => $c) {
                    $new[$i] = $c;
                }
                $found = true;
            }
        }
        if (!$found) {
            foreach ($items as $i => $c) {
                $new[$i] = $c;
            }
        }

        return $new;
    }
151853
public function setItems($items)
    {
        if ($items && !$items instanceof ItemBag) {
            $items = new MulticardsItemBag($items);
        }

        return $this->setParameter('items', $items);
    }
421572
public function update(array $sets, array $where = [])
    {
        $this->where($where);
        $this->builderCache->store('sets', $sets);

        return $this->platformUpdateHandler($this->builderCache);
    }
971925
public function add($items)
        {
            if ($items && $items instanceof Container) {
                $id = (int) $items->id;
                $this->_items[$id] = $items;
            } elseif (Arrays::is($items)) {
                foreach ($items as $obj) {
                    if ($obj instanceof Container) {
                        $this->add($obj);
                    }
                }
            } elseif ($items instanceof self) {
                $this->add($items->toArray());
            }

            return $this;
        }
1008491
public function setItems($items = array())
	{
		$this->items = array();

		foreach ($items as $key => $item) {
			if ( ! is_numeric($key) && is_array($item)) {

				// Check to see if the item contains many subitems
				if (array_key_exists('1', $item)) {
					$this->setItems($item);
					return false;
				}
				else {
					// This is a single item
					$this->push($item);
				}

			}
			elseif (is_array($item)) {
				$this->push($item);
			}
		}
	}
948288
public function addWhere(array $where): void
    {
        if (empty($where)) {
            return;
        }

        $firstClause = true;
        $this->statement .= ' WHERE ';
        foreach ($where as $clause) {
            if ($firstClause === false) {
                $this->statement .= ' ' . $clause['concatenator'] . ' ';
            }
            switch ($clause['operator']) {
                case 'IN':
                    $this->addWhereIn($clause['key'], $clause['value'], false);
                    break;
                case 'NOT IN':
                    $this->addWhereIn($clause['key'], $clause['value'], true);
                    break;
                case 'BETWEEN':
                    $this->addWhereBetween($clause['key'], $clause['value']['min'], $clause['value']['max']);
                    break;
                case 'NULL':
                    $this->addWhereNull($clause['key'], false);
                    break;
                case 'NOT NULL':
                    $this->addWhereNull($clause['key'], true);
                    break;
                default:
                    $this->addSimpleWhere($clause['key'], $clause['operator'], $clause['value']);
                    break;
            }

            $firstClause = false;
        }
    }
22790
public function replace(array $sets, array $where = [])
    {
        $this->where($where);
        $this->builderCache->store('sets', $sets);

        return $this->platformReplaceHandler($this->builderCache);
    }