14
14
use Symfony \Component \HttpFoundation \RequestMatcherInterface ;
15
15
use Symfony \Component \HttpFoundation \Request ;
16
16
use Symfony \Component \Security \Http \Firewall \ExceptionListener ;
17
+ use Symfony \Component \Security \Http \Firewall \LogoutListener ;
17
18
18
19
/**
19
20
* FirewallMap allows configuration of different firewalls for specific parts
@@ -25,9 +26,9 @@ class FirewallMap implements FirewallMapInterface
25
26
{
26
27
private $ map = array ();
27
28
28
- public function add (RequestMatcherInterface $ requestMatcher = null , array $ listeners = array (), ExceptionListener $ exceptionListener = null )
29
+ public function add (RequestMatcherInterface $ requestMatcher = null , array $ listeners = array (), ExceptionListener $ exceptionListener = null , LogoutListener $ logoutListener = null )
29
30
{
30
- $ this ->map [] = array ($ requestMatcher , $ listeners , $ exceptionListener );
31
+ $ this ->map [] = array ($ requestMatcher , $ listeners , $ exceptionListener, $ logoutListener );
31
32
}
32
33
33
34
/**
@@ -37,10 +38,10 @@ public function getListeners(Request $request)
37
38
{
38
39
foreach ($ this ->map as $ elements ) {
39
40
if (null === $ elements [0 ] || $ elements [0 ]->matches ($ request )) {
40
- return array ($ elements [1 ], $ elements [2 ]);
41
+ return array ($ elements [1 ], $ elements [2 ], $ elements [ 3 ] );
41
42
}
42
43
}
43
44
44
- return array (array (), null );
45
+ return array (array (), null , null );
45
46
}
46
47
}
0 commit comments