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
PageCache
Identifier.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\App\PageCache
;
7
8
use
Magento\Framework\App\ObjectManager
;
9
use
Magento\Framework\Serialize\Serializer\Json
;
10
14
class
Identifier
15
{
19
protected
$request
;
20
24
protected
$context
;
25
29
private
$serializer;
30
36
public
function
__construct
(
37
\
Magento
\Framework\
App
\Request\
Http
$request
,
38
\
Magento
\Framework\
App
\
Http
\
Context
$context
,
39
Json
$serializer =
null
40
) {
41
$this->request =
$request
;
42
$this->context =
$context
;
43
$this->serializer = $serializer ?:
ObjectManager::getInstance
()->get(Json::class);
44
}
45
51
public
function
getValue
()
52
{
53
$data
= [
54
$this->request->isSecure(),
55
$this->request->getUriString(),
56
$this->request->get(\
Magento
\Framework\
App
\
Response
\Http::COOKIE_VARY_STRING)
57
?: $this->context->getVaryString()
58
];
59
return
sha1($this->serializer->serialize(
$data
));
60
}
61
}
Magento\Framework\App\PageCache\Identifier\$context
$context
Definition:
Identifier.php:24
Magento\Framework\App\Response\Http
Definition:
FileFactory.php:7
Magento\Framework\App
Magento\Framework\Serialize\Serializer\Json
Definition:
Json.php:16
Magento\Framework\App\ObjectManager\getInstance
static getInstance()
Definition:
ObjectManager.php:33
Magento\Framework\App\Http
Definition:
Http.php:22
Magento\Framework\App\PageCache
Definition:
Cache.php:6
Magento\Framework\App\PageCache\Identifier\__construct
__construct(\Magento\Framework\App\Request\Http $request, \Magento\Framework\App\Http\Context $context, Json $serializer=null)
Definition:
Identifier.php:36
Magento\Framework\App\PageCache\Identifier\$request
$request
Definition:
Identifier.php:19
Magento\Framework\App\ObjectManager
Definition:
ConfigCache.php:8
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento
Magento\Framework\App\PageCache\Identifier
Definition:
Identifier.php:14
Context
Definition:
ClassesForConstructorIntegrity.php:33
Magento\Framework\App\PageCache\Identifier\getValue
getValue()
Definition:
Identifier.php:51