File tree 1 file changed +7
-1
lines changed
src/Symfony/Bundle/SecurityBundle/Security 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -26,18 +26,24 @@ class FirewallMap implements FirewallMapInterface
26
26
{
27
27
protected $ container ;
28
28
protected $ map ;
29
+ private $ contexts ;
29
30
30
31
public function __construct (ContainerInterface $ container , array $ map )
31
32
{
32
33
$ this ->container = $ container ;
33
34
$ this ->map = $ map ;
35
+ $ this ->contexts = new \SplObjectStorage ();
34
36
}
35
37
36
38
public function getListeners (Request $ request )
37
39
{
40
+ if ($ this ->contexts ->contains ($ request )) {
41
+ return $ this ->contexts [$ request ];
42
+ }
43
+
38
44
foreach ($ this ->map as $ contextId => $ requestMatcher ) {
39
45
if (null === $<
565B
/span>requestMatcher || $ requestMatcher ->matches ($ request )) {
40
- return $ this ->container ->get ($ contextId )->getContext ();
46
+ return $ this ->contexts [ $ request ] = $ this -> container ->get ($ contextId )->getContext ();
41
47
}
42
48
}
43
49
You can’t perform that action at this time.
0 commit comments