public function match(Request $request)
    {
        foreach ($this->firewalls as $firewall) {
            if ($firewall['method'] !== null && $request->getMethod() !== $firewall['method']) {
                continue;
            }

            if ($firewall['exact_match']) {
                if ($request->getPathInfo() === $firewall['path']) {
                    return $firewall;
                }
            } elseif (0 === strpos($request->getPathInfo(), $firewall['path'])) {
                return $firewall;
            }
        }

        return null;
    }
public function match(Request $request)
    {
        foreach ($this->firewalls as $firewall) {
            if ($firewall['method'] !== null && $request->getMethod() !== $firewall['method']) {
                continue;
            }

            if ($firewall['exact_match']) {
                if ($request->getPathInfo() === $firewall['path']) {
                    return $firewall;
                }
            } elseif (0 === strpos($request->getPathInfo(), $firewall['path'])) {
                return $firewall;
            }
        }

        return null;
    }
public function match ( Request $ request ) { foreach ( $ this -> firewalls as $ firewall ) { if ( $ firewall [ 'method' ] !== null && $ request -> getMethod ( ) !== $ firewall [ 'method' ] ) { continue ; } if ( $ firewall [ 'exact_match' ] ) { if ( $ request -> getPathInfo ( ) === $ firewall [ 'path' ] ) { return $ firewall ; } } elseif ( 0 === strpos ( $ request -> getPathInfo ( ) , $ firewall [ 'path' ] ) ) { return $ firewall ; } } return null ; }
Find the matching path
Find the matching path