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
module-indexer
App
Indexer.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Indexer\App
;
7
8
use
Magento\Framework\App
;
9
use
Magento\Framework\App\Filesystem\DirectoryList
;
10
11
class
Indexer
implements
\Magento\Framework\AppInterface
12
{
18
protected
$reportDir
;
19
23
protected
$filesystem
;
24
28
protected
$_response
;
29
36
public
function
__construct
(
37
$reportDir
,
38
\
Magento
\Framework\
Filesystem
$filesystem
,
39
\
Magento
\
Indexer
\Model\Processor
$processor
,
40
\
Magento
\Framework\
App
\Console\
Response
$response
41
) {
42
$this->reportDir =
$reportDir
;
43
$this->filesystem =
$filesystem
;
44
$this->processor =
$processor
;
45
$this->_response =
$response
;
46
}
47
53
public
function
launch
()
54
{
55
/* Clean reports */
56
$directory = $this->filesystem->getDirectoryWrite(
DirectoryList::ROOT
);
57
$path
= $directory->getRelativePath($this->reportDir);
58
if
($directory->isExist(
$path
)) {
59
$directory->delete(
$path
);
60
}
61
62
/* Regenerate all indexers */
63
$this->processor->reindexAll();
64
$this->_response->setCode(0);
65
66
return
$this->_response
;
67
}
68
72
public
function
catchException
(
App
\
Bootstrap
$bootstrap
, \Exception $exception)
73
{
74
return
false
;
75
}
76
}
Magento\Framework\App\Response\Http
Definition:
FileFactory.php:7
$response
$response
Definition:
404.php:11
Magento\Framework\App
Magento\Framework\Filesystem
Definition:
Filesystem.php:16
Magento\Indexer\App\Indexer\$filesystem
$filesystem
Definition:
Indexer.php:23
Magento\Indexer\App
Definition:
Indexer.php:6
$processor
$processor
Definition:
404.php:10
Magento\Framework\App\Bootstrap
Definition:
Bootstrap.php:27
$bootstrap
if(defined('TESTS_MAGENTO_INSTALLATION') &&TESTS_MAGENTO_INSTALLATION==='enabled') $bootstrap
Definition:
bootstrap.php:73
Magento\Indexer\App\Indexer\launch
launch()
Definition:
Indexer.php:53
Magento\Indexer\App\Indexer\__construct
__construct( $reportDir, \Magento\Framework\Filesystem $filesystem, \Magento\Indexer\Model\Processor $processor, \Magento\Framework\App\Console\Response $response)
Definition:
Indexer.php:36
Magento\Framework\AppInterface
Definition:
AppInterface.php:19
Magento
Magento\Framework\App\Filesystem\DirectoryList
Definition:
DirectoryList.php:13
Magento\Indexer\App\Indexer\$_response
$_response
Definition:
Indexer.php:28
Magento\Indexer\App\Indexer\catchException
catchException(App\Bootstrap $bootstrap, \Exception $exception)
Definition:
Indexer.php:72
Magento\Indexer\App\Indexer\$reportDir
$reportDir
Definition:
Indexer.php:18
Magento\Indexer\App\Indexer
Definition:
Indexer.php:11
$path
$path
Definition:
import_with_filesystem_images.php:14
Magento\Framework\App\Filesystem\DirectoryList\ROOT
const ROOT
Definition:
DirectoryList.php:18