src/Site/BaseSiteSelector.php
protected function matchRequest(SiteInterface $site, Request $request)
    {
        $results = [];

        // we read the value from the attribute to handle fragment support
        $requestPathInfo = $request->get('pathInfo', $request->getPathInfo());

        if (!preg_match(sprintf('@^(%s)(/.*|$)@', $site->getRelativePath()), $requestPathInfo, $results)) {
            return false;
        }

        return $results[2];
    }
protected function matchRequest(SiteInterface $site, Request $request)
    {
        $results = [];

        // we read the value from the attribute to handle fragment support
        $requestPathInfo = $request->get('pathInfo', $request->getPathInfo());

        if (!preg_match(sprintf('@^(%s)(/.*|$)@', $site->getRelativePath()), $requestPathInfo, $results)) {
            return false;
        }

        return $results[2];
    }
protected function matchRequest ( SiteInterface $ site , Request $ request ) { $ results = [ ] ; // we read the value from the attribute to handle fragment support $ requestPathInfo = $ request -> get ( 'pathInfo' , $ request -> getPathInfo ( ) ) ; if ( ! preg_match ( sprintf ( '@^(%s)(/.*|$)@' , $ site -> getRelativePath ( ) ) , $ requestPathInfo , $ results ) ) { return false ; } return $ results [ 2 ] ; }
Returns TRUE whether the given site matches the given request.

@param SiteInterface $site    A site instance
@param Request       $request A request instance

@return string|bool FALSE whether the site does not match
Returns TRUE whether the given site matches the given request .