Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
framework
Composer
ComposerFactory.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Composer
;
7
8
use Composer\IO\BufferIO;
9
use
Magento\Framework\App\Filesystem\DirectoryList
;
10
11
class
ComposerFactory
12
{
16
private
$directoryList;
17
21
private
$composerJsonFinder;
22
27
public
function
__construct
(
28
DirectoryList
$directoryList,
29
ComposerJsonFinder
$composerJsonFinder
30
) {
31
$this->directoryList = $directoryList;
32
$this->composerJsonFinder = $composerJsonFinder;
33
}
34
41
public
function
create
()
42
{
43
putenv(
'COMPOSER_HOME='
. $this->directoryList->getPath(
DirectoryList::COMPOSER_HOME
));
44
45
return \Composer\Factory::create(
46
new
BufferIO(),
47
$this->composerJsonFinder->findComposerJson()
48
);
49
}
50
}
Magento\Framework\Composer\ComposerFactory
Definition:
ComposerFactory.php:11
Magento\Framework\Composer\ComposerFactory\__construct
__construct(DirectoryList $directoryList, ComposerJsonFinder $composerJsonFinder)
Definition:
ComposerFactory.php:27
Magento\Framework\Composer
Definition:
BufferIoFactory.php:7
Magento\Framework\App\Filesystem\DirectoryList\COMPOSER_HOME
const COMPOSER_HOME
Definition:
DirectoryList.php:110
Magento\Framework\App\Filesystem\DirectoryList
Definition:
DirectoryList.php:13
Magento\Framework\Composer\ComposerFactory\create
create()
Definition:
ComposerFactory.php:41
Magento\Framework\Composer\ComposerJsonFinder
Definition:
ComposerJsonFinder.php:13