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)
app
autoload.php
Go to the documentation of this file.
1
<?php
8
use
Magento\Framework\Autoload\AutoloaderRegistry
;
9
use
Magento\Framework\Autoload\ClassLoaderWrapper
;
10
14
define(
'BP'
, dirname(
__DIR__
));
15
16
define(
'VENDOR_PATH'
,
BP
.
'/app/etc/vendor_path.php'
);
17
18
if
(!file_exists(
VENDOR_PATH
)) {
19
throw
new \Exception(
20
'We can\'t read some files that are required to run the Magento application. '
21
.
'This usually means file permissions are set incorrectly.'
22
);
23
}
24
25
$vendorDir
= require
VENDOR_PATH
;
26
$vendorAutoload
=
BP
.
"/{$vendorDir}/autoload.php"
;
27
28
/* 'composer install' validation */
29
if
(file_exists(
$vendorAutoload
)) {
30
$composerAutoloader = include
$vendorAutoload
;
31
}
else
{
32
throw
new \Exception(
33
'Vendor autoload is not found. Please run \'composer install\' under application root directory.'
34
);
35
}
36
37
AutoloaderRegistry::registerAutoloader(
new
ClassLoaderWrapper
($composerAutoloader));
__DIR__
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition:
_bootstrap.php:60
$vendorDir
if(!file_exists(VENDOR_PATH)) $vendorDir
Definition:
autoload.php:25
$vendorAutoload
$vendorAutoload
Definition:
autoload.php:26
Magento\Framework\Autoload\AutoloaderRegistry
Definition:
AutoloaderRegistry.php:13
VENDOR_PATH
const VENDOR_PATH
Definition:
autoload.php:16
BP
const BP
Definition:
autoload.php:14
Magento\Framework\Autoload\ClassLoaderWrapper
Definition:
ClassLoaderWrapper.php:13