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
ComposerJsonFinder.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Composer
;
7
8
use
Magento\Framework\App\Filesystem\DirectoryList
;
9
13
class
ComposerJsonFinder
14
{
18
private
$directoryList;
19
25
public
function
__construct
(
DirectoryList
$directoryList)
26
{
27
$this->directoryList = $directoryList;
28
}
29
36
public
function
findComposerJson
()
37
{
38
$composerJson = $this->directoryList->getPath(
DirectoryList::ROOT
) .
'/composer.json'
;
39
40
$composerJson = realpath($composerJson);
41
42
if
($composerJson ===
false
) {
43
throw
new \Exception(
'Composer file not found'
);
44
}
45
46
return
$composerJson;
47
}
48
}
Magento\Framework\Composer
Definition:
BufferIoFactory.php:7
Magento\Framework\App\Filesystem\DirectoryList
Definition:
DirectoryList.php:13
Magento\Framework\Composer\ComposerJsonFinder\__construct
__construct(DirectoryList $directoryList)
Definition:
ComposerJsonFinder.php:25
Magento\Framework\Composer\ComposerJsonFinder
Definition:
ComposerJsonFinder.php:13
Magento\Framework\Composer\ComposerJsonFinder\findComposerJson
findComposerJson()
Definition:
ComposerJsonFinder.php:36
Magento\Framework\App\Filesystem\DirectoryList\ROOT
const ROOT
Definition:
DirectoryList.php:18