File tree Expand file tree Collapse file tree 4 files changed +19
-12
lines changed
lib/internal/Magento/Framework/App/Request/Backpressure Expand file tree Collapse file tree 4 files changed +19
-12
lines changed Original file line number Diff line number Diff line change 12
12
use Magento \Framework \App \RequestInterface ;
13
13
14
14
/**
15
- * Uses other extractors.
15
+ * Uses other extractors
16
16
*/
17
17
class CompositeRequestTypeExtractor implements RequestTypeExtractorInterface
18
18
{
Original file line number Diff line number Diff line change 11
11
use Magento \Framework \App \ActionInterface ;
12
12
use Magento \Framework \App \Backpressure \ContextInterface ;
13
13
use Magento \Framework \App \Backpressure \IdentityProviderInterface ;
14
+ use Magento \Framework \App \ObjectManager ;
14
15
use Magento \Framework \App \RequestInterface ;
15
16
16
17
/**
17
- * Creates context for current request.
18
+ * Creates context for current request
18
19
*/
19
20
class ContextFactory
20
21
{
@@ -49,7 +50,7 @@ public function __construct(
49
50
}
50
51
51
52
/**
52
- * Create context if possible.
53
+ * Create context if possible
53
54
*
54
55
* @param ActionInterface $action
55
56
* @return ContextInterface|null
@@ -61,12 +62,15 @@ public function create(ActionInterface $action): ?ContextInterface
61
62
return null ;
62
63
}
63
64
64
- return new ControllerContext (
65
- $ this ->request ,
66
- $ this ->identityProvider ->fetchIdentity (),
67
- $ this ->identityProvider ->fetchIdentityType (),
68
- $ typeId ,
69
- $ action
65
+ return ObjectManager::getInstance ()->create (
66
+ ControllerContext::class,
67
+ [
68
+ $ this ->request ,
69
+ $ this ->identityProvider ->fetchIdentity (),
70
+ $ this ->identityProvider ->fetchIdentityType (),
71
+ $ typeId ,
72
+ $ action
73
+ ]
70
74
);
71
75
}
72
76
}
Original file line number Diff line number Diff line change 12
12
use Magento \Framework \App \Backpressure \ContextInterface ;
13
13
use Magento \Framework \App \RequestInterface ;
14
14
15
+ /**
16
+ * Controller request context
17
+ */
15
18
class ControllerContext implements ContextInterface
16
19
{
17
20
/**
@@ -93,7 +96,7 @@ public function getTypeId(): string
93
96
}
94
97
95
98
/**
96
- * Controller instance.
99
+ * Controller instance
97
100
*
98
101
* @return ActionInterface
99
102
*/
Original file line number Diff line number Diff line change 12
12
use Magento \Framework \App \RequestInterface ;
13
13
14
14
/**
15
- * Extracts type ID for backpressure context.
15
+ * Extracts type ID for backpressure context
16
16
*/
17
17
interface RequestTypeExtractorInterface
18
18
{
19
19
/**
20
- * Extract type ID if possible.
20
+ * Extract type ID if possible
21
21
*
22
22
* @param RequestInterface $request
23
23
* @param ActionInterface $action
You can’t perform that action at this time.
0 commit comments