1414use Symfony \Component \HttpFoundation \RequestMatcherInterface ;
1515use Symfony \Component \HttpFoundation \Request ;
1616use Symfony \Component \Security \Http \Firewall \ExceptionListener ;
17+ use Symfony \Component \Security \Http \Firewall \LogoutListener ;
1718
1819/**
1920 * FirewallMap allows configuration of different firewalls for specific parts
@@ -25,9 +26,9 @@ class FirewallMap implements FirewallMapInterface
2526{
2627 private $ map = array ();
2728
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 )
2930 {
30- $ this ->map [] = array ($ requestMatcher , $ listeners , $ exceptionListener );
31+ $ this ->map [] = array ($ requestMatcher , $ listeners , $ exceptionListener, $ logoutListener );
3132 }
3233
3334 /**
@@ -37,10 +38,10 @@ public function getListeners(Request $request)
3738 {
3839 foreach ($ this ->map as $ elements ) {
3940 if (null === $ elements [0 ] || $ elements [0 ]->matches ($ request )) {
40- return array ($ elements [1 ], $ elements [2 ]);
41+ return array ($ elements [1 ], $ elements [2 ], $ elements [ 3 ] );
4142 }
4243 }
4344
44- return array (array (), null );
45+ return array (array (), null , null );
4546 }
4647}
0 commit comments