public static function createUrlMatcher(Authentication $authentication, $url)
    {
        $matcher = function (RequestInterface $request) use ($url) {
            return preg_match($url, $request->getRequestTarget());
        };

        return new static($authentication, $matcher);
    }
public static function createUrlMatcher(Authentication $authentication, $url)
    {
        $matcher = function (RequestInterface $request) use ($url) {
            return preg_match($url, $request->getRequestTarget());
        };

        return new static($authentication, $matcher);
    }
public static function createUrlMatcher ( Authentication $ authentication , $ url ) { $ matcher = function ( RequestInterface $ request ) use ( $ url ) { return preg_match ( $ url , $ request -> getRequestTarget ( ) ) ; } ; return new static ( $ authentication , $ matcher ) ; }
Creates a matching authentication for an URL.

@param Authentication $authentication
@param string         $url

@return self
Creates a matching authentication for an URL .