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
DocRootLocator.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\App
;
8
9
use
Magento\Framework\App\Filesystem\DirectoryList
;
10
use
Magento\Framework\Filesystem\Directory\ReadFactory
;
11
15
class
DocRootLocator
16
{
20
private
$request;
21
25
private
$readFactory;
26
31
public
function
__construct
(
RequestInterface
$request,
ReadFactory
$readFactory)
32
{
33
$this->request =
$request
;
34
$this->readFactory = $readFactory;
35
}
36
42
public
function
isPub
()
43
{
44
$rootBasePath = $this->request->getServer(
'DOCUMENT_ROOT'
);
45
$readDirectory = $this->readFactory->create(
DirectoryList::ROOT
);
46
return
(substr($rootBasePath, -strlen(
'/pub'
)) ===
'/pub'
) && !$readDirectory->isExist($rootBasePath .
'setup'
);
47
}
48
}
Magento\Framework\App
Magento\Framework\App\DocRootLocator\isPub
isPub()
Definition:
DocRootLocator.php:42
Magento\Framework\App\DocRootLocator
Definition:
DocRootLocator.php:15
Magento\Framework\App\DocRootLocator\__construct
__construct(RequestInterface $request, ReadFactory $readFactory)
Definition:
DocRootLocator.php:31
Magento\Framework\Filesystem\Directory\ReadFactory
Definition:
ReadFactory.php:10
Magento\Framework\App\RequestInterface
Definition:
RequestInterface.php:14
$request
$request
Definition:
quote_with_configurable_product_last_variation.php:22
Magento\Framework\App\Filesystem\DirectoryList
Definition:
DirectoryList.php:13
Magento\Framework\App\Filesystem\DirectoryList\ROOT
const ROOT
Definition:
DirectoryList.php:18