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
App
DeploymentConfig
FileReader.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\App\DeploymentConfig
;
7
8
use
Magento\Framework\App\Filesystem\DirectoryList
;
9
use
Magento\Framework\Config\File\ConfigFilePool
;
10
use
Magento\Framework\Exception\FileSystemException
;
11
use
Magento\Framework\Filesystem\DriverPool
;
12
18
class
FileReader
19
{
25
private
$dirList;
26
32
private
$configFilePool;
33
39
private
$driverPool;
40
46
public
function
__construct
(
47
DirectoryList
$dirList,
48
DriverPool
$driverPool,
49
ConfigFilePool
$configFilePool
50
) {
51
$this->dirList =
$dirList
;
52
$this->configFilePool = $configFilePool;
53
$this->driverPool = $driverPool;
54
}
55
64
public
function
load
($fileKey)
65
{
66
$path
= $this->dirList->getPath(
DirectoryList::CONFIG
);
67
$fileDriver = $this->driverPool->getDriver(
DriverPool::FILE
);
68
$filePath =
$path
.
'/'
. $this->configFilePool->getPath($fileKey);
69
70
if
($fileDriver->isExists($filePath)) {
71
return
include $filePath;
72
}
73
74
return
[];
75
}
76
}
Magento\Framework\App\DeploymentConfig\FileReader\__construct
__construct(DirectoryList $dirList, DriverPool $driverPool, ConfigFilePool $configFilePool)
Definition:
FileReader.php:46
Magento\Framework\Filesystem\DriverPool\FILE
const FILE
Definition:
DriverPool.php:17
$dirList
if(!file_exists($installConfigFile)) $dirList
Definition:
bootstrap.php:57
Magento\Framework\App\Filesystem\DirectoryList\CONFIG
const CONFIG
Definition:
DirectoryList.php:28
Magento\Framework\App\DeploymentConfig\FileReader
Definition:
FileReader.php:18
Magento\Framework\Exception\FileSystemException
Definition:
FileSystemException.php:14
Magento\Framework\Config\File\ConfigFilePool
Definition:
ConfigFilePool.php:14
Magento\Framework\Filesystem\DriverPool
Definition:
DriverPool.php:12
Magento\Framework\App\DeploymentConfig\FileReader\load
load($fileKey)
Definition:
FileReader.php:64
Magento\Framework\App\Filesystem\DirectoryList
Definition:
DirectoryList.php:13
Magento\Framework\App\DeploymentConfig
Definition:
CommentParser.php:6
$path
$path
Definition:
import_with_filesystem_images.php:14