Set dependency from php extensions.

$extension has next view:
array('curl', 'mysql')

@param array|string $extensions
@return Mage_Connect_Package
762689
public function setDependencyPhpExtensions($extensions)
    {
        foreach($extensions as $_extension) {
            $this->addDependencyExtension(
                $_extension['name'],
                $_extension['min_version'],
                $_extension['max_version']
            );
        }
        return $this;
    }
902849
public function setExtensionAttributes(
        \Magento\Catalog\Api\Data\CategoryProductLinkExtensionInterface $extensionAttributes
    ) {
        return $this->_setExtensionAttributes($extensionAttributes);
    }
1304659
public function addExtensions($extensions)
    {
        foreach ($extensions as $extName) {
            $this->twig->addExtension(is_object($extName) ? $extName : Yii::createObject($extName));
        }
    }
177879
public function addDependentExtension($rule, $extension)
    {
        $this->addExtension($rule, $extension);

        $this->dependentRules[] = Str::studly($rule);
    }
454806
public function withExtensionRequest(Extensions $extensions): self
    {
        $obj = clone $this;
        if (!isset($obj->_attributes)) {
            $obj->_attributes = new Attributes();
        }
        $obj->_attributes = $obj->_attributes->withUnique(
            Attribute::fromAttributeValues(
                new ExtensionRequestValue($extensions)));
        return $obj;
    }
872214
public function addExtension($extension = null)
    {
        if ($extension == null) {
            return $this->twigEnvironment->addExtension($this->twigDebug());
        }

        return $this->twigEnvironment->addExtension($extension);
    }
273524
public function setAsRequired($name)
    {
        $provider = $this->importDependency($name);
        $lastRequired = null;

        try {
            foreach ($provider->getDependencies() as $dependencyName) {
                $lastRequired = $dependencyName;
                if (!$this->isRequired($dependencyName)) {
                    $this->setAsRequired($dependencyName);
                }
            }
        } catch (DependencyException $exception) {
            throw new DependencyException(
                $exception->getCode() === 1
                    ? 'Dependency not found: '.$lastRequired.' < '.$name
                    : $exception->getMessage().' < '.$name,
                2
            );
        }

        return $this;
    }
363434
public function registerExtensionProviders(ExtensionContract $extension)
    {
        $filePath = $extension->getPath() . '/providers.php';

        if ($this->files->exists($filePath)) {
            $providers = (array) $this->files->getRequire($filePath);

            $this->provides($providers);
        }
    }
771471
protected function loadExtension($extension)
	{
		if (isset($this->classMap[$extension]))
		{
			return;
		}
		foreach ($this->supportedTypes as $imageType => $extensions)
		{
			if (in_array($extension, $extensions, true))
			{
				$this->loadType($imageType);
			}
		}
	}
196916
public function addImplicitExtensions(array $extensions)
    {
        $this->addExtensions($extensions);

        foreach ($extensions as $rule => $extension) {
            $this->implicitRules[] = studly_case($rule);
        }
    }
754783
public function pushExtension(ExtensionInterface $extension)
    {
        array_unshift($this->extensionStack, $extension);
        $extension->setupNamespaces($this);

        return $this;
    }
742855
public function addExtension($extension)
    {
        /** @var ViewFinderInterface $viewFinder */
        foreach ($this->viewFinders as $viewFinder) {
            try {
                $viewFinder->addExtension($extension);
            } catch (\Exception $e) {
            }
        }
    }
797113
public function addExtension(EdgeExtensionInterface $extension, $name = null)
    {
        $this->extensions[$name ?: $extension->getName()] = $extension;

        return $this;
    }
1331403
public function withExtensions(Ext\Extension ...$exts): Extensions
    {
        $obj = clone $this;
        foreach ($exts as $ext) {
            $obj->_extensions[$ext->oid()] = $ext;
        }
        return $obj;
    }
220148
public function dependsOn($dependencies)
    {
        if (is_array($dependencies)) {
            $this->dependencies = array_merge(
                $dependencies,
                $this->dependencies
            );
        } elseif (is_string($dependencies)) {
            $this->dependencies[] = $dependencies;
        } else {
            throw new LackOfCoffeeException(
                'Dependencies can either be an array of strings or a string'
            );
        }

        return $this;
    }
1256519
public function setExtensions(array $extensions)
    {
        $this->extensions = [];
        foreach ($extensions as $extension) {
            $this->addExtension($extension);
        }

        return $this;
    }
1138632
protected function validateExtensions($extensions): Extensions
    {
        if (empty($extensions)) {
            $extensions = new Extensions(['']);
        }

        if (! $extensions instanceof Extensions) {
            $extensions = new Extensions((array)$extensions);
        }

        return $extensions;
    }