Set the packages (owerrides the exists)

@param  array $packages
@return ElementAbstract
181938
public function setPackages(array $packages) {
		$this->resetPackages();
		
		foreach ($packages as $package) {
			$this->appendPackage($package);
		}
		
		return $this;
	}
264686
public function setNodeB($package)
    {
        $this->set('nodeB', $package);
        $this->set('endDate', clone $this->startDate);
        $this->endDate->addSeconds($package->duration);

        return $this;
    }
1358056
public function setTags(array $tags) {
        if($this->setModified('tags', $tags)->isModified()) {
            $this->tags = $tags;
        }

        return $this;
    }
1320736
public function set(array $set)
    {
        foreach ($set as $loader => $fields) {
            $this->loader($loader)->fields($fields);
        }

        // Disable
        $this->contextLoader = false;

        return $this;
    }
1256750
public void setPackages(java.util.Collection<String> packages) {
        if (packages == null) {
            this.packages = null;
            return;
        }

        this.packages = new com.amazonaws.internal.SdkInternalList<String>(packages);
    }
1244726
public function setValues(array $values)
    {
        foreach ($values as $name => $value) {
            if ($element = $this->get($name)) {
                $element->setValue($value);
            }
        }
        return $this;
    }
116125
public function setPackages(array $activePackages)
    {
        /** @var Package $package */
        foreach ($activePackages as $packageKey => $package) {
            foreach ($package->getFlattenedAutoloadConfiguration() as $configuration) {
                $this->createNamespaceMapEntry($configuration['namespace'], $configuration['classPath'], $configuration['mappingType']);
            }
            // TODO: Replace with "autoload-dev" usage
            if ($this->considerTestsNamespace) {
                foreach ($package->getNamespaces() as $namespace) {
                    $this->createNamespaceMapEntry($namespace, $package->getPackagePath(), self::MAPPING_TYPE_PSR4);
                }
            }
        }
    }
1320886
public function add($package)
    {
        if ((!$package instanceof PackageInterface)) {
            $name = $package;
            $package = Package::create($name);
        }

        $this->put($package->getName(), $package);

        return $package;
    }
614446
public function setPackage(AbstractPackage $package = null)
    {
        if ($package === null) {
            $package = new NullPackage();
        }

        $this->package = $package;

        return $this;
    }
530667
public function calculateMergedDependenciesOfPackages($packages)
    {
        $dependencies = [];

        foreach ($packages as $package) {
            $dependencies = $this->calculateMergedDependenciesOfPackage($package, $dependencies);
        }

        return $dependencies;
    }
872790
public function setPackage($package)
    {
        if ($package instanceof AbstractPackage) {
            $this->package = $package;
        } else {
            $this->package = PackageHelper::getPackage($package);
        }

        return $this;
    }
172970
public function appendPackage($package) {
		$package = $this->handlePackage($package);
		
		$this->packages[] = $package;
		return $package;
	}
874829
public function setDependencies($dependencies)
    {
        if(!is_array($dependencies))
            $dependencies = array($dependencies);

        $this->setProperty('dependencies', $dependencies);

        return $this;
	}
371220
protected function formatRequirements(array $packages)
    {
        $requires = [];
        $packages = $this->normalizeRequirements($packages);
        foreach ($packages as $package) {
            $requires[$package['name']] = $package['version'];
        }

        return $requires;
    }
906111
public function addSets(array $values = array())
    {
        foreach ($values as $column => $value) {
            $this->addSet($column, $value);
        }

        return $this;
    }
607164
public function setCurrentPackage($package)
    {
        if (!$package instanceof AbstractPackage) {
            $package = $this->packageResolver->getPackage($package);
        }

        $this->packageResolver->setCurrentPackage($package);

        return $this;
    }
1112283
public function setInstalledPackages(array $installedPackages)
    {
        $dictionary = [];
        foreach ($installedPackages as $installedPackage) {
            $dictionary[$installedPackage->getPackageHandle()] = $installedPackage;
        }
        $this->installedPackages = $dictionary;

        return $this;
    }