Add a list of Sites and their dependencies to this package instance.
@param array $list Mixed list of CNabuList instances and/or Site Ids.
@return int Returns the number of Sites added.
185207
public function addSites(array $list) : int
    {
        $count = $this->getObjectsCount();
        $nb_customer = $this->getCustomer();

        foreach ($list as $item) {
            if (!($item instanceof CNabuSite) &&
                is_numeric($nb_site_id = nb_getMixedValue($item, NABU_SITE_FIELD_ID))
            ) {
                $nb_site = $nb_customer->getSite($nb_site_id);
                if (!$nb_site instanceof CNabuSite) {
                    throw new ENabuCoreException(ENabuCoreException::ERROR_SITE_NOT_FOUND);
                }
            } elseif ($item instanceof CNabuSite) {
                $nb_site = $item;
                if (!$nb_site->validateCustomer($nb_customer)) {
                    throw new ENabuSecurityException(ENabuSecurityException::ERROR_CUSTOMER_NOT_OWNER);
                }
            } else {
                throw new ENabuCoreException(ENabuCoreException::ERROR_SITE_NOT_FOUND);
            }

            $nb_site->refresh(true, true);
            $this->nb_site_list->addItem($nb_site);
            $this->nb_language_list->merge($nb_site->getLanguages(true));
            $this->nb_role_list->merge($nb_site->getRoles(true));
        }

        return $this->getObjectsCount() - $count;
    }
219365
public static function fromList(array $list)
    {
        if (count($list) !== count($list, COUNT_RECURSIVE)) {
            throw new NodeException('List is not a one-dimensional array.');
        }

        array_walk($list, function (&$item) {
            $item = array($item);
        });
        return new self($list);
    }
430332
private function buildListItens($list, $arr)
	{
		foreach ($arr as $key=>$value) 
		{
			$item = XmlUtil::CreateChild($list, "item", "");
			XmlUtil::AddAttribute($item, "id", $key);
			XmlUtil::AddAttribute($item, "text", $value);
		}
	}
1163997
public static int removeDuplicateNodeList(List<String> list) {

        int originCount = list.size();
        // add elements to all, including duplicates
        HashSet<String> hs = new LinkedHashSet<String>();
        hs.addAll(list);
        list.clear();
        list.addAll(hs);

        return originCount - list.size();
    }
1217865
public function merge(CNabuDataObjectList $list)
    {
        $items = $list->getItems();

        while (is_array($items) && count($items) > 0) {
            
        }
    }
628473
protected function prepareListPage(array &$list)
    {
        foreach ($list as &$item) {
            $this->setItemUrlEntity($item, $this->store, 'page');
        }
    }
23167
protected function __apiDestroy(array $list)
    {
        HCPagesTranslations::destroy(HCPagesTranslations::whereIn('record_id', $list)->pluck('id')->toArray());
        $pages = HCPages::findMany($list);

        foreach ($pages as $page) {
            $page->removeCachedMenu();
            $page->delete();
        }

        return hcSuccess();
    }
585443
public function merge(CNabuDataObjectList $list)
    {
        $count = 0;

        if ($list->isFilled()) {
            $list->iterate(
                function ($key, $item) use ($count)
                {
                    if (!$this->containsKey($key)) {
                        $this->addItem($item);
                        $count++;
                    }

                    return true;
                }
            );
        } else {
            $this->list = $list->list;
            $this->secondary_indexes = $list->secondary_indexes;
            $count = is_array($list->list) ? count($list->list) : 0;
        }

        return $count;
    }
1232563
protected function checkEntry( array $list )
	{
		if( $this->getValue( $list, 'attribute.code' ) === null ) {
			return false;
		}

		if( ( $type = $this->getValue( $list, 'product.lists.type' ) ) && !isset( $this->listTypes[$type] ) )
		{
			$msg = sprintf( 'Invalid type "%1$s" (%2$s)', $type, 'product list' );
			throw new \Aimeos\Controller\Common\Exception( $msg );
		}

		if( ( $type = $this->getValue( $list, 'attribute.type' ) ) && !isset( $this->types[$type] ) )
		{
			$msg = sprintf( 'Invalid type "%1$s" (%2$s)', $type, 'attribute' );
			throw new \Aimeos\Controller\Common\Exception( $msg );
		}

		return true;
	}
913261
public function append($list = null)
    {
        if (is_string($list)) {
            $this->_list[] = $list;
        }

        if (is_array($list)) {
            $this->_list = array_merge($this->_list, $list);
        }

        return $this;
    }
968890
public function
	Append(Array $List, Bool $Keys=FALSE) {
	/*//
	goes through the given array and appends all the data to this dataset. by
	default the array keys are completely ignored. if you need to preseve
	the keys (and ergo overwrite any existing data) set the second argument
	to true.
	//*/

		foreach($List as $Key => $Value) {
			if(!$Keys)
			$this->Push($Value);

			else
			$this->Shove($Key,$Value);
		}

		return;
	}
940521
protected function filterList($list)
    {
        $conf = Configuration::getConfig(self::CONFIG_FILE_NAME);
        $disableWhitelisting
            = $conf->getBoolean(self::PROPNAME_DISABLE_WHITELISTING, false);

        if (!isset($this->originalsp['disco.doNotFilterIdps'])
            || !$this->originalsp['disco.doNotFilterIdps']
        ) {
            $list = parent::filterList($list);
            $list = $this->scoping($list);
            if (!$disableWhitelisting) {
                $list = $this->whitelisting($list);
            }
            $list = $this->greylisting($list);
            $list = $this->greylistingPerSP($list, $this->originalsp);
        }

        if (empty($list)) {
            throw new Exception('All IdPs has been filtered out. And no one left.');
        }

        return $list;
    }
168689
private function evaluateList(array $list): float
    {
        if (empty($list)) {
            return 1;
        }

        $hit = 0;
        foreach ($list as $line) {
            if (preg_match('/<a\s+href=([\'"]?)([^"\'\s]+)\1/isu', $line)) {
                $hit++;
            }
        }

        return 9 * (1.0 * $hit / count($list)) ** 2 + 1;
    }
1039644
public static function size($list)
    {
        if ($list === null)
            return 0;

        if (is_scalar($list) || is_resource($list))
            return 1;

        if (is_array($list) || $list instanceof \Countable)
            return count($list);

        if ($list instanceof \Traversable)
            return iterator_count($list);

        $count = 0;
        static::each($list, function() use (& $count) { $count++; });
        return $count;
    }
929956
final public void addPositions(Set<Integer> list) {
    int[] positions = ArrayUtils
        .toPrimitive(list.toArray(new Integer[list.size()]));
    addPositions(positions);
  }
812057
public static Object addArray(Object list, Object[] array) {
        for (int i = 0; array != null && i < array.length; i++)
            list = LazyList.add(list, array[i]);
        return list;
    }
1256530
private function countMergeCommits(array $commitList)
    {
        $count = 0;
        foreach ($commitList as $filePathCommit) {
            if (!$this->isMergeCommit($filePathCommit)) {
                continue;
            }

            $count++;
        }

        return $count;
    }