Collection to be added
@access public
@param array $collection Collection to be added
@return void
171698
private function AddCollectionToConfig($collection)
	{
		foreach($collection as $key=>$value)
		{
			if ($key[0] == '/')
				$this->_virtualCommand = str_replace('_', '.', substr($key, 1));
			$this->addPairToConfig($key, $value);
		}
	}
425340
public static function isValid($collection)
    {
        if (false === is_array($collection) && false === ($collection instanceof Collection)) {
            return false;
        }

        return true;
    }
616776
public function add(array $emails)
    {
        if(!empty ($emails) ){
            foreach ($emails as $key => $values) {
                $this->set($key, $values);
            }
        }
    }
891717
public function addAll(array $elements)
    {
        if (is_array($elements)) {
            foreach ($elements as $element) {
                $this->_items[] = $element;
            }
            $this->_iterator = null;
        } else {
            throw new CollectionException('Given array can not added to collection, because it is no array.', E_NOTICE);
        }
    }
1283861
public function registerCollection(array $collection)
    {
        foreach ($collection as $name => $handler) {
            $this->register($name, $handler);
        }

        return $this;
    }
1006358
public function sync($collection)
    {
        foreach ($collection as $item) {
            $websiteId = $item->getWebsiteId();
            if ($this->helper->isEnabled($websiteId)) {
                $this->client = $this->engagementCloudAddressBookApiFactory->create()
                    ->setRequiredDataForClient($websiteId);
                $importData = $this->serializer->unserialize($item->getImportData());

                $this->syncItem($item, $importData, $websiteId);
            }
        }
        //update suppress status for contact ids
        if (!empty($this->suppressedContactIds)) {
            $this->contactResource->setContactSuppressedForContactIds($this->suppressedContactIds);
        }
    }
705010
public function addDocument($document) {
		if(is_array($document)) {
			$this->addDocumentArray($document);
		} elseif ($document instanceof Document) {
			$this->addDocumentObject($document);
		}
	}
36286
public function addCollection(ReferenceGeneratorCollection $collection)
    {
        // we need to remove all generators with the same names first because 
        // just replacing them
        // would not place the new generator at the end of the merged array
        foreach ($collection->all() as $generator) {
            $this->generators[] = $generator;
        }
        
        usort($this->generators,array($this,'compareGenerators'));
    }
226330
protected function addCollection()
    {
        if (!$this->isError()) {
            $id = $this->collection->add($this->getSubmitted());
            if (empty($id)) {
                $this->errorAndExit($this->text('Unexpected result'));
            }
            $this->line($id);
        }
    }
166227
public function loadCollection(PersistentCollection $collection)
    {
        $association = $collection->getMapping();
        $persister   = $this->getEntityPersister($association->getTargetEntity());

        if ($association instanceof OneToManyAssociationMetadata) {
            $persister->loadOneToManyCollection($association, $collection->getOwner(), $collection);
        } else {
            $persister->loadManyToManyCollection($association, $collection->getOwner(), $collection);
        }

        $collection->setInitialized(true);
    }
957350
public function addRoles(Collection $roles)
    {
        foreach($roles as $role){
            $this->roles->add($role);
        }
        
    }
822165
public function add($data) {
        if (!array_search($data, $this->_datas, true) && is_object($data)) {
            $data = clone $data;
        }

        if (is_array($data)) {
            $this->_datas = array_merge($this->_datas, $data);
        }
        else {
            if (get_class($data) != 'Gcs\Framework\Core\Collection\Collection') {
                array_push($this->_datas, $data);
            }
            else {
                array_merge($this->_datas, $data->data());
            }
        }
    }
944128
public function apply(Collection $collection)
    {
        $this->collection = $collection;

        foreach ($this->filters() as $name => $value) {
            if (! method_exists($this, $name)) {
                continue;
            }

            if (is_array($value) or trim($value)) {
                $this->collection = $this->$name($value);
            } else {
                $this->collection = $this->$name();
            }
        }

        return $this->collection;
    }
1074970
protected function addCollection()
    {
        $this->controlAccess('collection_add');

        if ($this->collection->add($this->getSubmitted())) {
            $this->redirect('admin/content/collection', $this->text('Collection has been added'), 'success');
        }

        $this->redirect('', $this->text('Collection has not been added'), 'danger');
    }
773084
public function add($field)
    {
        if (is_array($field)) {
            foreach ($field as $item) {
                $this->add($item);
            }
        } else {
            $this->fields[] = $field;
        }
    }
303799
public function addCollection(RuleCollection $collection)
    {
        foreach ($collection as $name => $rule) {
            $this->set($name, $rule);
        }
    }
348378
private function _collection($collection) {
    return (!is_array($collection) && !is_object($collection)) ? str_split((string) $collection) : $collection;
  }